help me - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: help me (
/showthread.php?tid=430915)
help me -
MicroSof - 15.04.2013
I have a problem in the fuel system
at any time the fuel does not just help me please
Код:
forward Gas();
SetTimer("Gas",10000, 1);
public Gas(){
for(new i=0;i<MAX_PLAYERS;i++){
new nomepl[MAX_PLAYER_NAME];
GetPlayerName(i, nomepl, sizeof(nomepl));
format(file2, sizeof(file2), Folder_Accounts, nomepl);
new vid;
vid = GetPlayerVehicleID(i);
new model;
model = GetVehicleModel(vid);
if(!(model == 509 || model == 510 || model == 481)){
new estado;
estado = GetPlayerVehicleSeat(i);
GetPlayerState(i);
if(IsPlayerInAnyVehicle(i) == 1){
if(estado == 0){
dini_IntSet(file2, "Gas", dini_Int(file2, "Gas")-1);
}
if(dini_Int(file2, "Gas") <= 0){
SendClientMessage(i, Red, "Your Petrol over, Step into the Tour but Close to Re-Fill!");
RemovePlayerFromVehicle(i);
}
}
}
}
}
Re: help me -
MicroSof - 15.04.2013
Someone? please
Re: help me -
[ABK]Antonio - 15.04.2013
pawn Код:
forward Gas();
SetTimer("Gas",10000, 1);
public Gas() {
for(new i=0;i<MAX_PLAYERS;i++)
{
new nomepl[MAX_PLAYER_NAME];
GetPlayerName(i, nomepl, sizeof(nomepl));
format(file2, sizeof(file2), Folder_Accounts, nomepl);
new model;
model = GetVehicleModel(GetPlayerVehicleID(i));
if(model != 509 && model != 510 && model != 481)
{
if(estado == 0) dini_IntSet(file2, "Gas", dini_Int(file2, "Gas")-1);
if(dini_Int(file2, "Gas") <= 0)
{
SendClientMessage(i, Red, "Your Petrol over, Step into the Tour but Close to Re-Fill!");
RemovePlayerFromVehicle(i);
}
}
}
return 1;
}
Not sure what you're trying to do, what doesn't it do?