Alles anzeigenif(strcmp(cmd,"/gotocoords",true) == 0)
{
if//Deine Admin abfrage
{
new coordstr[3][24], Float:coords[3];
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid,COLOR_WHITE," /gotocoords X,Y,Z");
split(tmp,coordstr,',');
coords[0] = floatstr(coordstr[0]);
coords[1] = floatstr(coordstr[1]);
coords[2] = floatstr(coordstr[2]);
SetPlayerPos(playerid,coords[0],coords[1],coords[2]);
format(string,sizeof(string)," Erfolgreich teleportiert: X %f Y %f Z %f",coords[0],coords[1],coords[2]);
SendClientMessage(playerid,COLOR_YELLOW,string);
}
return 1;
}
für split wen gebraucht wird
forward split(const strsrc[], strdest[][], delimiter);
public split(const strsrc[], strdest[][], delimiter)
{
new i, li;
new aNum;
new len;
while(i <= strlen(strsrc)){
if(strsrc[i]==delimiter || i==strlen(strsrc)){
len = strmid(strdest[aNum], strsrc, li, i, 128);
strdest[aNum][len] = 0;
li = i+1;
aNum++;
}
i++;
}
return 1;
}
error 017: undefined symbol "cmd"
error 017: undefined symbol "tmp"
error 017: undefined symbol "strtok"
error 017: undefined symbol "tmp"
error 017: undefined symbol "split"
error 017: undefined symbol "string"
error 017: undefined symbol "string"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
9 Errors.
Habe bischer nur mit ocmd gearbeitet und ein paar befehle mit strcmp
Der Befehl steht unter OnPlayerCommandText.