help please
#1

im trying to script this command

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;

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
Reply


Messages In This Thread
help please - by darkknight123 - 12.01.2011, 15:23
Re: help please - by iJumbo - 12.01.2011, 15:29
Re: help please - by darkknight123 - 12.01.2011, 15:43
Re: help please - by iJumbo - 12.01.2011, 15:49
Re: help please - by darkknight123 - 12.01.2011, 15:53
Re: help please - by iJumbo - 12.01.2011, 16:01

Forum Jump:


Users browsing this thread: 1 Guest(s)