25.12.2011, 03:25
i have a cmd where you do /up, /down, /left, /right. The defualt for up is 50 and the rest is 10. How can i make it so you do /up (amount) /down (amount) left right (amount)
pawn Код:
if (strcmp("/up", cmdtext, true, 8 ) == 0)
{
new Float:X, Float:Y, Float:Z;
new vehicleid = GetPlayerVehicleID(playerid);
GetPlayerPos(playerid, X, Y, Z);
if(IsPlayerInAnyVehicle(playerid)) {
SetVehiclePos(vehicleid, X, Y, Z+50);
SendClientMessage(playerid,COL_ADMIN,"** Moved up 50 feet.");
}
else {
SetPlayerPos(playerid,X, Y, Z+50);
SendClientMessage(playerid,COL_ADMIN,"** Moved up 50 feet.");
}
return 1;
}