Quote:
Originally Posted by PawnHunter
PHP код:
// UNDER INCLUDES
#define TimeToReload 1800000 // 30 minutes.
new
LastTickCount[MAX_PLAYERS];
// OnPlayerConnect:
LastTickCount[playerid] = 0;
// YOUR COMMAND
CMD:fixveh(playerid, params[])
{
if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pPremiumAccount] < 1) return SendClientMessage(playerid, COLOR_WHITE, "Nu esti premium");
{
if(IsPlayerInAnyVehicle(playerid))
{
if(GetTickCount() > LastTickCount[playerid])
{
RepairVehicle(GetPlayerVehicleID(playerid));
Gas[GetPlayerVehicleID(playerid)] = 100;
SendClientMessage(playerid, COLOR_WHITE, "Masina a fost reparata.");
LastTickCount[playerid] = GetTickCount() + TimeToReload;
}
else return SendClientMessage(playerid, COLOR_WHITE, "Wait 30 mins before using it again.");
}
}
}
return 1;
}
|
the problem is that in game it tells me that the command doesen't exist