/slap is only slapping me
#1

pawn Код:
CMD:slap(playerid, params[])
{
    new sID;
    if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COL_GREEN, "SERVER: Ainult adminid alates level 2 saavad seda kasutada!");
    if(sscanf(params, "u", sID))
    {
        new Float:x, Float:y, Float:z, Float:nurk;
        GetPlayerPos(sID, x, y, z);
        GetPlayerFacingAngle(sID, nurk);
        SetPlayerPos(sID, Float:x, Float:y, Float:z+5);
        SetPlayerFacingAngle(sID, Float: nurk);
    }else{
    SendClientMessage(playerid, COL_GREY, "SERVER: Хige kasutus: /slap ID");
    }
    return 1;
}
When I type /slap, it slaps me. But when I type /slap ID, "unknown command"
Reply
#2

What is this..
what your /slap should do lol
Reply
#3

Is your sscanf is updated? and what SAMP Client Version you are using.
Reply
#4

Try this:

pawn Код:
CMD:slap(playerid, params[])
{
    if(IsPlayerConnected(playerid))
    {
        new sID;
        if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COL_GREEN, "SERVER: Ainult adminid alates level 2 saavad seda kasutada!");
        if(sscanf(params, "u", sID)) return SendClientMessage(playerid, COL_GREY, "SERVER: Хige kasutus: /slap ID");
        new Float:x, Float:y, Float:z, Float:nurk;
        GetPlayerPos(sID, x, y, z);
        GetPlayerFacingAngle(sID, nurk);
        SetPlayerPos(sID, Float:x, Float:y, Float:z+5);
        SetPlayerFacingAngle(sID, Float: nurk);
       
    }
    return 1;
}
should work.
Reply
#5

it is solved already, ty
Reply
#6

Quote:
Originally Posted by flashsnake
Посмотреть сообщение
it is solved already, ty
Did the code I post help you?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)