if(strcmp(strget(cmdtext,0), "/pn", true) == 0)
{
tmp = strtok(cmdtext,idx);
if(!strlen(tmp) || strlen(tmp) > 5) {
SendClientMessage(playerid,COLOR_RED,"Usage: /pn (id) (text)");
return 1;
}
new id = strval(tmp);
gMessage = strtok(cmdtext,idx);
if(!strlen(gMessage)) {
SendClientMessage(playerid,COLOR_RED,"Usage: /pn (id) (text)");
return 1;
}
if(!IsPlayerConnected(id)) {
SendClientMessage(playerid,COLOR_RED,"/pn : Bad player ID");
return 1;
}
if(playerid != id) {
GetPlayerName(playerid,iName,sizeof(iName));
GetPlayerName(playerid,pName,sizeof(pName));
format(Message,sizeof(Message),">> %s(%d): %s",iName,id,gMessage);
SendClientMessage(playerid,COLOR_RED,Message);
format(Message,sizeof(Message),"** %s(%d): %s",pName,playerid,gMessage);
SendClientMessage(ziel,COLOR_RED,Message);
printf("PM: %s",Message);
}
else {
SendClientMessage(playerid,COLOR_RED,"You cannot PM yourself");
}
return 1;
}
und wenn ich das mache dann steht da You cannot PM yourself obwohl ich eine andere id genommen habe
kann mir einer behilflich sein
mgf
deathrunner