14.03.2013, 03:02
Hey this is probably an easy question for alot of you, and yea I could just go look in other scripts..
but I'm slowly learning to script and I'd appriciate it alot if you could show and explain or just show and I'll figure it out myself how to make this.
I got a slap commands that only shows some text and takes some HP off the player, but I want him to fly upwards aswell, what do I need to do?
dcmd_slap(playerid,params[]) {
if(IsPlayerCommandLevel(playerid,"slap")) {
if(!strlen(params)) return SendClientMessage(playerid,red,"Wrong Fromat: /SLAP <NICK OR ID>");
new id; if(!IsNumeric(params)) id = ReturnPlayerID(params); else id = strval(params);
if(IsPlayerConnected(id) && id != INVALID_PLAYER_ID && id != playerid) {
SendCommandMessageToAdmins(playerid,"SLAP");
new string[256],name[24],ActionName[24]; GetPlayerName(playerid,name,24); GetPlayerName(id,ActionName,24);
format(string,256,"Administrator \"%s\" has bitch-slapped \"%s\".",name,ActionName); SendClientMessageToAll(yellow,string);
new Float:Health; GetPlayerHealth(id,Health); return SetPlayerHealth(id,Health-Config[SlapDecrement]);
} else return SendClientMessage(playerid,red,"ERROR: You can not slap yourself or a disconnected player.");
} else return SendLevelErrorMessage(playerid,"slap");
but I'm slowly learning to script and I'd appriciate it alot if you could show and explain or just show and I'll figure it out myself how to make this.
I got a slap commands that only shows some text and takes some HP off the player, but I want him to fly upwards aswell, what do I need to do?
dcmd_slap(playerid,params[]) {
if(IsPlayerCommandLevel(playerid,"slap")) {
if(!strlen(params)) return SendClientMessage(playerid,red,"Wrong Fromat: /SLAP <NICK OR ID>");
new id; if(!IsNumeric(params)) id = ReturnPlayerID(params); else id = strval(params);
if(IsPlayerConnected(id) && id != INVALID_PLAYER_ID && id != playerid) {
SendCommandMessageToAdmins(playerid,"SLAP");
new string[256],name[24],ActionName[24]; GetPlayerName(playerid,name,24); GetPlayerName(id,ActionName,24);
format(string,256,"Administrator \"%s\" has bitch-slapped \"%s\".",name,ActionName); SendClientMessageToAll(yellow,string);
new Float:Health; GetPlayerHealth(id,Health); return SetPlayerHealth(id,Health-Config[SlapDecrement]);
} else return SendClientMessage(playerid,red,"ERROR: You can not slap yourself or a disconnected player.");
} else return SendLevelErrorMessage(playerid,"slap");