31.07.2011, 17:57
I not a user of ycmd, but try this:
pawn Код:
YCMD:slap(playerid, params[], help)
{
#pragma unused help
new vName[MAX_PLAYER_NAME];
new pName[MAX_PLAYER_NAME];
new Float:x, Float:y, Float:z;
new string[128];
GetPlayerName(playerid,pName, 32);
if(IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdmin] >= 1)
{
new rplayer;
if(sscanf(params, "i", rplayer)) return SendClientMessage(playerid, COLOR_ORANGE, "Usage: /slap [playerid]");
if(!IsPlayerConnected(rplayer)) return SendClientMessage(playerid, COLOR_ORANGE, "Player not connected");
GetPlayerName(rplayer,vName, 32);
format(string, sizeof(string), "%s has slapped %s",pName,vName); // Defining string
SendClientMessageToAll(COLOR_ORANGE, string);
GetPlayerPos(playerid, x,y,z);
SetPlayerPos(playerid,x,y,z+15);
}
else SendClientMessage(playerid, COLOR_ORANGE,"You are not a high enough level to use this command !");
return 1;
}