22.06.2012, 10:13
pawn Код:
if(strcmp("/sms", cmd, true) == 0)
{
if(PlayerInfo[playerid][pPhone] == 1)
{
tmp = strtok(cmdtext,idx);
if(!strlen(tmp))
{
SendClientMessage(playerid,COLOR_WHITE,"Usage: /sms [number] [message]");
}
new gMessage[256];
new Message[256];
new pName[MAX_PLAYER_NAME+1];
new number;
number = PlayerInfo[playerid][pNr];
gMessage = strrest(cmdtext,idx);
if(!strlen(gMessage))
{
SendClientMessage(playerid,COLOR_WHITE,"Usage: /sms [number] [message]");
}
if(PlayerInfo[playerid][pNr] == strlen(tmp))
{
GetPlayerName(playerid,pName,sizeof(pName));
format(Message,sizeof(Message),"%s(%d): %s",pName,number,gMessage);
SendClientMessage(playerid,COLOR_YELLOW,Message);
}
}
return 1;// I think you need to put return 1
}