[NEED] I need a /slap command.
#1

As you can read I need a /slap command, I'm using Impact gaming RP.
Reply
#2

* dr.lozer slaps for admins or players ?? around a bit with a large trout.

and do you use zcmd or others include file tell me

does /slap cmd damage to player or just a text ?
Reply
#3

Admins only, and no damage. Just let them fly up a little, no textdraws etc.
and yes zcmd
Reply
#4

Ohh, no not zcmd.
Reply
#5

CMD: slap(playerid, params[])
{

}
Reply
#6

Here u go:
pawn Код:
CMD:slap(playerid, params[])
{
    new slapitav, slapitavanimi[MAX_PLAYER_NAME], slapijanimi[MAX_PLAYER_NAME], string[128], Float:slx, Float:sly, Float:slz;
    if(M2ngijaInfo[playerid][aLevel] < 9) return SendClientMessage(playerid,COLOR_GRAD2,"U'r not an admin!");
    if(sscanf(params,"u", slapitav)) return SendClientMessage(playerid, COLOR_GRAD1,"USEAGE: /slap PID/PON!");
    if(!IsPlayerConnected(slapitav)) return SendClientMessage(playerid, COLOR_GRAD2, "Wrong player ID!");
   
    GetRPName(slapitav, slapitavanimi, sizeof(slapitavanimi));
    GetRPName(playerid, slapijanimi, sizeof(slapijanimi));
    GetPlayerPos(slapitav, slx, sly, slz);
    SetPlayerPos(slapitav, slx, sly, slz+5);
    format(string, 256, "%s got slapped by admin %s.", slapitavanimi, slapijanimi);
    SendClientMessageToAll(PUTURCOLORHERE,string);
    print(string);
    return 1;
}
(( Translated from Estonian. ))
Reply
#7

pawn Код:
if(!strcmp("/slap",cmdtext,true)) {
    new id, slapitavanimi[MAX_PLAYER_NAME], slapijanimi[MAX_PLAYER_NAME], string[128], Float:slx, Float:sly, Float:slz;
    if(!IsPlayerAdmin(playerid)) return 0;
    if(sscanf(cmdtext,"i", id)) return SendClientMessage(playerid, COLOR_GRAD1,"USEAGE: /slap [playerid]");
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_GRAD2, "Wrong player ID!");
   
    GetRPName(id, slapitavanimi, sizeof(slapitavanimi));
    GetRPName(playerid, slapijanimi, sizeof(slapijanimi));
    GetPlayerPos(slapitav, slx, sly, slz);
    SetPlayerPos(slapitav, slx, sly, slz+5);
    format(string, 256, "%s got slapped by admin %s.", slapitavanimi, slapijanimi);
    SendClientMessageToAll(-1,string);
    print(string);
    return 1;
}
Reply
#8

@TSONN's CODE

Код:
C:\Users\MIJN PC\Documents\GAMEMODESSSSSS\Impact Gaming\gamemodes\IGRP.pwn(12582) : error 017: undefined symbol "slap"
C:\Users\MIJN PC\Documents\GAMEMODESSSSSS\Impact Gaming\gamemodes\IGRP.pwn(12585) : error 017: undefined symbol "M2ngijaInfo"
C:\Users\MIJN PC\Documents\GAMEMODESSSSSS\Impact Gaming\gamemodes\IGRP.pwn(12585) : warning 215: expression has no effect
C:\Users\MIJN PC\Documents\GAMEMODESSSSSS\Impact Gaming\gamemodes\IGRP.pwn(12585) : error 001: expected token: ";", but found "]"
C:\Users\MIJN PC\Documents\GAMEMODESSSSSS\Impact Gaming\gamemodes\IGRP.pwn(12585) : error 029: invalid expression, assumed zero
C:\Users\MIJN PC\Documents\GAMEMODESSSSSS\Impact Gaming\gamemodes\IGRP.pwn(12585) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Errors.
Reply
#9

lozer's code should work because I believe your using strcmp?
Reply
#10

M2ngijaInfo = PlayerInfo

Can u post the line 12582?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)