23.06.2010, 07:13
Lock
// Hotwire
if(strcmp(cmdtext, "/hotwire", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pJob] == 5)
{
if(IsPlayerInAnyVehicle(playerid))
{
new timestamp = GetTickCount();
LastHW[playerid] = timestamp;
if(timestamp - LastHW[playerid] < 5000)
{
SendClientMessage(playerid, COLOR_RED, "Your trying to hotwire it.");
SetTimerEx("HotwireSucces", 5000, 0, "i", playerid);
}
}
}
}
return 1;
}
new vehicleid = GetPlayerVehicleID(playerid);

|
Originally Posted by » Lorenc « (back)
Add this piece of Code
Код:
new vehicleid = GetPlayerVehicleID(playerid); ![]() -Lorenc |
|
Originally Posted by iggy1
pawn Код:
![]() |
if(IsPlayerInVehicle(playerid, vehicleid))//his code
if(IsPlayerInAnyVehicle(playerid))//mine
|
Originally Posted by SisasPoiss
Quote:
|
// Hotwire
if(strcmp(cmdtext, "/hotwire", true) == 0)
{
new vehicleid = GetPlayerVehicleID(playerid);
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pJob] == 5)
{
if(IsPlayerInVehicle(playerid, vehicleid))
{
new timestamp = GetTickCount();
LastHW[playerid] = timestamp;
if(timestamp - LastHW[playerid] < 5000)
{
SendClientMessage(playerid, COLOR_RED, "Your trying to hotwire it.");
SetTimerEx("HotwireSucces", 5000, 0, "i", playerid);
}
}
}
}
return 1;
}
|
Originally Posted by iggy1
Did u try my code?
|