I have one little problem so pls help.
#4

Quote:
Originally Posted by еddy
This is an example:

pawn Код:
dcmd_kill(playerid, params[])
{
new player2 = strval(params);
new params1[256], index;
params1 = strtok(params, index);
if(!strlen(params))
{
SendClientMessage(playerid,COLOR_RED,"Usage: /kill [playerid]");
return 1;
}
if(!IsPlayerConnected(player2))
{
SendClientMessage(playerid,0xFFFFFFAA,"Error: Player is not connected");
return 1;
}
new playername[MAX_PLAYER_NAME], playername2[MAX_PLAYER_NAME], string[256];
GetPlayerName(player2, playername, sizeof(playernamename));
GetPlayerName(playerid, playername2, sizeof(playername2));
format(string, sizeof(string), "%s has killed %s", playername2, playername);
SendClientMessageToAll(0xFF000AA, string);
SetPlayerHealth(player2, 0);
return 1;
}
K, tnx.
Reply


Messages In This Thread
I have one little problem so pls help. - by Frankox - 08.07.2009, 13:12
Re: I have one little problem so pls help. - by refshal - 08.07.2009, 13:21
Re: I have one little problem so pls help. - by Remba - 08.07.2009, 13:22
Re: I have one little problem so pls help. - by Frankox - 08.07.2009, 13:22
Re: I have one little problem so pls help. - by Frankox - 08.07.2009, 13:23
Re: I have one little problem so pls help. - by refshal - 08.07.2009, 13:26
Re: I have one little problem so pls help. - by Frankox - 08.07.2009, 13:39
Re: I have one little problem so pls help. - by refshal - 08.07.2009, 13:44
Re: I have one little problem so pls help. - by -Sneaky- - 08.07.2009, 14:10
Re: I have one little problem so pls help. - by Frankox - 08.07.2009, 15:45

Forum Jump:


Users browsing this thread: 2 Guest(s)