ionutuidumanu Posted June 28, 2011 Report Share Posted June 28, 2011 Deci am o promblema la comanda /up,cand dau de ex /up 10 imi apare asa "Use correct: /up <Height>"Uitati si comanda:COMMAND:up(playerid,idx, params[]) { new Float:x, Float:y, Float:z; new tmp[256]; tmp = strtok(params,idx); new height = strval(tmp); if(height != 0) { if(IsPlayerInAnyVehicle(playerid)) { GetVehiclePos(GetPlayerVehicleID(playerid), x, y, z); SetVehiclePos(GetPlayerVehicleID(playerid), x, y, z + height); } else { GetPlayerPos(playerid, x, y, z); GivePlayerWeapon(playerid, 46, 1); SetPlayerPos(playerid, x, y, z + height); } } else { SendClientMessage(playerid, COLOR_RED, "Use correct: /up <Height>"); } return 1; } The Legend Link to comment Share on other sites More sharing options...
xxSPEEDYxx Posted June 28, 2011 Report Share Posted June 28, 2011 incerca asa: COMMAND:up(playerid, params[]) { new Float:x, Float:y, Float:z; tmp = strtok(cmdtext, idx); new height = strval(tmp); if(height != 0) { if(IsPlayerInAnyVehicle(playerid)) { GetVehiclePos(GetPlayerVehicleID(playerid), x, y, z); SetVehiclePos(GetPlayerVehicleID(playerid), x, y, z + height); } else { GetPlayerPos(playerid, x, y, z); GivePlayerWeapon(playerid, 46, 1); SetPlayerPos(playerid, x, y, z + height); } } else { SendClientMessage(playerid, COLOR_RED, "Correct usage: /up <height>"); } return 1; } Fara reclama in semnatura! Link to comment Share on other sites More sharing options...
Roach Posted June 28, 2011 Report Share Posted June 28, 2011 Incearca asa:CMD:up( playerid, params[ ] ) { new Float:x, Float:y, Float:z; new height = strval(params); if(height == 0) return SendClientMessage(playerid, COLOR_RED, "Use correct: /up <Height>"); if(IsPlayerInAnyVehicle(playerid)) { GetVehiclePos(GetPlayerVehicleID(playerid), x, y, z); SetVehiclePos(GetPlayerVehicleID(playerid), x, y, z + height); } else { GetPlayerPos(playerid, x, y, z); GivePlayerWeapon(playerid, 46, 1); SetPlayerPos(playerid, x, y, z + height); } return ( 1 ); } Underground-GFX Link to comment Share on other sites More sharing options...
ionutuidumanu Posted June 28, 2011 Author Report Share Posted June 28, 2011 Mersi mult Roach am rezolvat :laugh: The Legend Link to comment Share on other sites More sharing options...
Question
ionutuidumanu
Deci am o promblema la comanda /up,cand dau de ex /up 10 imi apare asa "Use correct: /up <Height>"
Uitati si comanda:
COMMAND:up(playerid,idx, params[])
{
new Float:x, Float:y, Float:z;
new tmp[256];
tmp = strtok(params,idx);
new height = strval(tmp);
if(height != 0)
{
if(IsPlayerInAnyVehicle(playerid))
{
GetVehiclePos(GetPlayerVehicleID(playerid), x, y, z);
SetVehiclePos(GetPlayerVehicleID(playerid), x, y, z + height);
}
else
{
GetPlayerPos(playerid, x, y, z);
GivePlayerWeapon(playerid, 46, 1);
SetPlayerPos(playerid, x, y, z + height);
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "Use correct: /up <Height>");
}
return 1;
}
The Legend
Link to comment
Share on other sites
3 answers to this question
Recommended Posts