19.06.2012, 01:32
Can someone convert this into zcmd?
pawn Код:
public OnPlayerCommandText(playerid,cmdtext[]) {
if (!strcmp("/refuel",cmdtext,true,7)) {
if (!IsPlayerAtRefuelStation(playerid)) return SendClientMessage(playerid,COLOR_INDIANRED,"You are not on a fuel station.");
if (!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_INDIANRED,"You are not in a vehicle!");
if (isrefuelling[playerid]) return SendClientMessage(playerid,COLOR_INDIANRED,"You are already refuelling!");
if (GetPlayerMoney(playerid) - 80 <0) return SendClientMessage(playerid,COLOR_INDIANRED,"You dont have enough money!");
GivePlayerMoney(playerid,-80);
SetCameraBehindPlayer(playerid);
TogglePlayerControllable(playerid,0);
isrefuelling[playerid] = 1;
TextDrawSetString(td_fuel[playerid],"Refuelling...");
SetTimerEx("timer_refuel",4500,false,"i",playerid);
return 1;
}
return 0;
}