All pastes #186898 Raw Edit

Anonymous

public c v1 · immutable
#186898 ·published 2006-09-30 16:05 UTC
rendered paste body
public OnPlayerCommandText(playerid, cmdtext[]){	new cmd[256],idx;	cmd = strtok(cmdtext, idx);		///////////////Pos save/////////////	if(strcmp(cmd, "/pos", true) == 0)	{	    new tmp[256];  		tmp = strtok(cmdtext, idx);		if(!strlen(tmp))		{			SendClientMessage(playerid, COLOR_WHITE, "USAGE: /save [name]");			return 1;		} else		{			new Float:x,Float:y,Float:z,Float:f;			GetPlayerPos(playerid,x,y,z);            GetPlayerFacingAngle(playerid,f);            			new location[256];            format(location, sizeof(location), "%f ,%f ,%f/%f: %s",x,y,z,f,name);            new handle[256];			handle = fopen("gamedata/possaves.txt",io_append);			fwrite(handle,location);			SendClientMessage(playerid, COLOR_RED, location);			return 1;		}		return 1;	}}