20.07.2012, 20:07
Hey , have someone a /fall command who work's ?
if (strcmp("/fall", cmdtext, true, 10) == 0) { SetPlayerPos(playerid,-2504.2859, -701.3402, 403.2815); SendClientMessage(playerid, 0xFFFF00AA, "Welcome to Fall enjoy it XD"); GivePlayerWeapon(playerid,46,1); return 1; } |
if(strcmp(cmd, "/fall", true) == 0)
{
if(GetPlayerState(playerid) != PLAYER_STATE_ONFOOT) { return 1; }
if (!strlen(cmdtext[6])) return SendClientMessage(playerid,COLOR_USAGE,"TIP: /fall [1-2]");//replace COLOR_USAGE with your own color
switch (cmdtext[6])
{
case '1': LoopingAnim(playerid,"PED","KO_skid_front",4.1,0,1,1,1,0);
case '2': LoopingAnim(playerid, "PED","FLOOR_hit_f", 4.0, 1, 0, 0, 0, 0);
default: SendClientMessage(playerid,COLOR_USAGE,"TIP: /fall [1-2]");
}
return 1;
}
if (strcmp("/fall", cmdtext, true, 10) == 0) { if (GetPlayerPos(playerid, x, y, z)){ SetPlayerPos(playerid, x, y, 40); } return 1; }
new Float:x, Float:y, Float:z;
CMD:fall(playerid,params[])
{
new height;
if(sscanf(params,"i",height)) return SendClientMessage(playerid,COLOR_RED,"Usage: /fall [height]");
new Float:P,Float:O,Float:S;
GetPlayerPos(playerid,P,O,S);
SetPlayerPos(playerid,P,O,height);
return 1;
}
if (strcmp(cmd, "/fall", true) == 0)
{
new tmp[20],id;
tmp = strtok(cmdtext, index);
if (strlen(tmp)) return SendClientMessage(playerid,COLOR_RED,"Usage: /fall [height]");
id = strval(tmp);
new Float:P,Float:O,Float:S;
GetPlayerPos(playerid,P,O,S);
SetPlayerPos(playerid,P,O,id);
return 1;
}