26.11.2009, 11:32
Well, I dont get any errors while compiling this, but when I get to the PlayerToPoint and types /clothes it dont work.
If I type /clothes anywhere it dont work, no reaction...
Thanks
Код:
if(strcmp(cmd, "/clothes", true) == 0) { if(IsPlayerConnected(playerid)) { new level; level = strval(tmp); if(level > 299 || level < 1) { return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, 0xC0C0C0FF, "USAGE: /clothes [skin id]"); return 1; } if(PlayerToPoint(1,playerid,217.5215,-98.3179,1005.2578)) { GetPlayerName(playerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); PlayerInfo[playerid][pChar] = level; format(string, sizeof(string), "You have changed your clothes",level); SendClientMessage(playerid, 0xFFFFFFFF, string); SetPlayerSkin(playerid, PlayerInfo[playerid][pChar]); } } else { SendClientMessage(playerid, 0xC0C0C0FF, " you are not at the clothes shop!"); } return 1; } return 0; }
Thanks