public OnPlayerText(playerid, text[])
{
if(strcmp(cmdtext,"/bsn",true)==0)
{
SetPlayerPos(playerid,1227.1797,-914.0590,42.6812);
}
return 0;
}
Wo ist der Fehler ? Er sagt undefindet cmdtext und jezz ?
public OnPlayerText(playerid, text[])
{
if(strcmp(cmdtext,"/bsn",true)==0)
{
SetPlayerPos(playerid,1227.1797,-914.0590,42.6812);
}
return 0;
}
Wo ist der Fehler ? Er sagt undefindet cmdtext und jezz ?
Das Ganze muss unter OnPlayerCommandText
EDIT:
Auszug aus dem Wiki:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/help", true))
{
SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: This is the /help command!");
return 1;
/* Returning '1' is used to notify the server that the command
has successfully been processed. If you return true here you won't
get that 'SERVER: Unknown Command.', and any conflicts will be
avoided.
*/
}
return 0;
/* Returning '0' is used to inform the server that the command
has not been successfully processed, and passes it to other scripts.
If there hasn't been a successful process, then you will get that
'SERVER: Unknown Command.' error.
*/
}
Dann sollte es bei dir:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/bsn", true))
{
SetPlayerPos(playerid,1227.1797,-914.0590,42.6812);
return 1;
}
return 0;
}