Help please
#1

Im still trying to make a /asslick command this is what i have so far but when someone puts in a command that dosnt exist it asslicks id 0 and if they /asslick it wont work please help idk what im doing wrong :/

Код:
#include <a_samp>
#include strtok


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];
              new otherplayername[30];
              GetPlayerName(playerid, name, sizeof(name));
              GetPlayerName(otherplayer, otherplayername, sizeof(otherplayername));
              format(string, sizeof(string), " %s Is now asslicking %s", name,otherplayername);
              SendClientMessageToAll(0x33CCFFAA, string);
              SendClientMessage(playerid,0xFFFFFFFF,"Heres 10000000 Dollers for your trubles ");
              GivePlayerMoney(playerid, 100000000);
			  sleep(20);
              SendClientMessage(playerid,0xFFFFFFFF,"wait never mind I want that money back!");
              GivePlayerMoney(playerid,-100000000);
}
              else
{
              SendClientMessage(playerid,0xFFFFFFFF, "Haha!, The Player you are trying to asslick isn't online! noob.");
}
              return 1;
}
              return 0;
}
Reply
#2

sorry fr duble post but im impatient abouse stuff like this >.< sorry
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)