Posts: 95
Threads: 15
Joined: Nov 2012
Posts: 95
Threads: 15
Joined: Nov 2012
pawn Код:
stock StopRefueling(playerid)
{
new string [256];
GivePlayerCash(playerid, -RefuelingVehiclePrice[playerid]);
format(strng,sizeof(string),"Your vehicle's tank has been refilled for $%d.", RefuelingVehiclePrice[playerid]);
SendClientMessageEx(playerid, COLOR_WHITE,string);
new mypoint = -1;
for (new i=0; i<MAX_POINTS; i++)
{
if(strcmp(Points[i][Name], "Fossil Fuel Company", true) == 0)
{
mypoint = i;
}
}
for(new i = 0; i < sizeof(FamilyInfo); i++)
{
if(strcmp(Points[mypoint][Owner], FamilyInfo[i][FamilyName], true) == 0)
{
FamilyInfo[i][FamilyBank] = FamilyInfo[i][FamilyBank]+(RefuelingVehiclePrice[playerid]/10);
}
}
RefuelingVehicle[playerid] = 0; RefuelingVehiclePrice[playerid] = 0; KillTimer(RefuelingVehicleTimer[playerid]);
return true;
}
}
try this
Posts: 193
Threads: 58
Joined: Jan 2012
Reputation:
0
it give this
G:\X Roleplay v2.4\pawno\XRP.pwn(3692) : error 017: undefined symbol "strng"
G:\X Roleplay v2.4\pawno\XRP.pwn(3692) : error 035: argument type mismatch (argument 1)
G:\X Roleplay v2.4\pawno\XRP.pwn(3714) : error 054: unmatched closing brace ("}")
Posts: 193
Threads: 58
Joined: Jan 2012
Reputation:
0
sorry about the above bi space.
This is the right one
stock StopRefueling(playerid)
{
GivePlayerCash(playerid, -RefuelingVehiclePrice[playerid]);
SendClientMessageEx(playerid, COLOR_WHITE,"Your vehicle's tank has been refilled for $%d.", RefuelingVehiclePrice[playerid]);
new mypoint = -1;
for (new i=0; i<MAX_POINTS; i++)
{
if(strcmp(Points[i][Name], "Fossil Fuel Company", true) == 0)
{
mypoint = i;
}
}
for(new i = 0; i < sizeof(FamilyInfo); i++)
{
if(strcmp(Points[mypoint][Owner], FamilyInfo[i][FamilyName], true) == 0)
{
FamilyInfo[i][FamilyBank] = FamilyInfo[i][FamilyBank]+(RefuelingVehiclePrice[playerid]/10);
}
}
RefuelingVehicle[playerid] = 0; RefuelingVehiclePrice[playerid] = 0; KillTimer(RefuelingVehicleTimer[playerid]);
return true;
}