12.01.2011, 15:23
im trying to script this command
but when i try it ig it works fine but is says
EX: Melek is now asslicking 1251923
and every time i try it the other player is some random number
Quote:
public OnPlayerCommandText(playerid, cmdtext[]) { new idx; if (strcmp("/asslick", cmdtext, true)) { new tmp[30]; tmp = strtok(cmdtext, idx); new otherplayer = strval(tmp); if(!strlen(tmp)) return SendClientMessage(playerid, 0x919191FF, "Usage: /asslick [id]"); if(IsPlayerConnected(otherplayer)) { new string[64], name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); format(string, sizeof(string), " %s Is now asslicking %d", name); SendClientMessageToAll(0x33CCFFAA, string); SendClientMessage(playerid,0xFFFFFFFF,"Heres 1 Doller for your trubles "); GivePlayerMoney(playerid, 1); SendClientMessage(playerid,0xFFFFFFFF,"wait never mind I want that money back!"); GivePlayerMoney(playerid,-1000); } else { SendClientMessage(playerid,0xFFFFFFFF, "Haha!, The Player you are trying to asslick isn't online! noob."); } return 1; } return 0; |
EX: Melek is now asslicking 1251923
and every time i try it the other player is some random number