16.07.2010, 12:16
Hai all i need to fix these 3 problems fast bacause im payng money for my server and all and all problems are with premium package.
1st.pslap/It slaps ID 0 all the time
}
1st.pslap/It slaps ID 0 all the time
pawn Код:
COMMAND:pslap(playerid,params,cmdtext[])
{
if(isprem[playerid] == 0)
{
SendClientMessage(playerid, COLOR_RED, "You arent a premium member"); return 1;
}
else
{
new idx,tmp[256];
new sendername[MAX_PLAYER_NAME],giveplayer[MAX_PLAYER_NAME];
new string [128];
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /pslap [playerid]");
return 1;
}
else
{
new otherplayer = strval(tmp);
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(otherplayer, giveplayer, sizeof(giveplayer));
new Float:X, Float:Y, Float:Z;
GetPlayerPos(otherplayer, X, Y, Z);
SetPlayerPos(otherplayer, X, Y, Z+10);
format(string, sizeof(string), "\"%s\" was slapped by Admin \"%s\".", giveplayer, sendername);
SendClientMessageToAll(COLOR_YELLOW, string);
}
}
return 1;