[NEED] I need a /slap command. -
Robinn - 10.12.2012
As you can read I need a /slap command, I'm using Impact gaming RP.
Re: [NEED] I need a /slap command. -
dr.lozer - 10.12.2012
* 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 ?
Re: [NEED] I need a /slap command. -
Robinn - 10.12.2012
Admins only, and no damage. Just let them fly up a little, no textdraws etc.
and yes zcmd
Re: [NEED] I need a /slap command. -
Robinn - 10.12.2012
Ohh, no not zcmd.
Re: [NEED] I need a /slap command. -
Mr.Anonymous - 10.12.2012
CMD: slap(playerid, params[])
{
}
Re: [NEED] I need a /slap command. -
tsonn1 - 10.12.2012
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.
))
Re: [NEED] I need a /slap command. -
dr.lozer - 10.12.2012
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;
}
Re: [NEED] I need a /slap command. -
Robinn - 10.12.2012
@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.
Re: [NEED] I need a /slap command. -
Sting. - 10.12.2012
lozer's code should work because I believe your using strcmp?
Re: [NEED] I need a /slap command. -
tsonn1 - 10.12.2012
M2ngijaInfo = PlayerInfo
Can u post the line 12582?