24.10.2010, 14:06
Why the hell do you use strtok? O_O
pawn Код:
dcmd_cp(playerid,params[])
{
if(IsPlayerAdmin(playerid)) {
new cpName;
new Float:X,Float:Y,Float:Z,string[128];
GetPlayerPos(playerid,X,Y,Z);
if(strlen(params)) {
strmid(cpName, params, 0, 255);
CreateDynamicCP(X,Y,Z,3,-1,-1,-1,100.0);
format(string,sizeof(string),"%s = CreateDynamicCP(%0.1f,%0.1f,%0.1f,3,-1,-1,-1,100.0);",cpName,X,Y,Z);
SaveToFile("CheckPoints",string);
} else return SendClientMessage(playerid,red,"USAGE: /CP [CP Name]");
} else return SendERROR(playerid,1);
return 1;
}