Posts: 1,733
Threads: 187
Joined: Oct 2014
Reputation:
0
I tried to search around, i didn't find tutorials but
i found huge codes which idk what the slap does anyways
I don't want ALL the slap command, i want to know how to make the player being slapped that's it.
Posts: 21
Threads: 5
Joined: Jun 2015
Reputation:
0
I use SetPlayerPos(playerid, x, y, z+3)
Posts: 1,498
Threads: 110
Joined: Aug 2013
Код:
CMD:slap(playerid,params[])
{
if(pInfo[playerid][pAdminLevel] >= 2 || IsPlayerAdmin(playerid))
{
new targetid,string[128];
if(sscanf(params, "u", targetid)) return SendClientMessage(playerid,-1,""chat" /slap [playerid]");
if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid,-1,""chat" Player is not online");
new Float:posxx[3];
GetPlayerPos(targetid, posxx[0], posxx[1], posxx[2]);
SetPlayerPos(targetid, posxx[0], posxx[1], posxx[2]+40);
if(IsPlayerAdmin(playerid))
{
format(string, sizeof(string), "*"COL_RED" RCON Admin has slapped %s",PlayerName(targetid));
SendMessageToAllAdmins(string,-1);
}
else
{
format(string, sizeof(string), "*"COL_RED" %s %s has slapped %s",GetAdminName(playerid),PlayerName(playerid),PlayerName(targetid));
SendMessageToAllAdmins(string,-1);
}
}
else {
SendClientMessage(playerid,-1,"*"COL_RED" You do not have the right admin permissions for this command!");
}
return 1;
}
Replace the variables with your own
Posts: 10
Threads: 0
Joined: Apr 2014
Reputation:
0
To my understanding it is essentially just increasing the "z" co-ordinate to whatever height you desire. So say you were to move slap the player up by 10 you'd replace the z in (x,y,z) with "z+10".
Hope this helped.