3 Questions - 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: 3 Questions (
/showthread.php?tid=305305)
3 Questions -
Rokzlive - 22.12.2011
1. Whats the function that loops through all the players?
2. Does anyone have the vehicles enum that has all the vehicle names plus ids?
3. Does anyone have zones.inc and the function that locates their position and figures out the zone they are in?
Re: 3 Questions -
[ABK]Antonio - 22.12.2011
loop
pawn Код:
for(new i; i<= MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
}
}
however i don't have the other 2
Re: 3 Questions -
Rokzlive - 22.12.2011
One is better than none
Re: 3 Questions -
coole210 - 22.12.2011
1. for(new i = 0; i <= GetMaxPlayers(); i++)
{
}
2.
http://pastebin.com/dqGfwYmu (Made by Seif_)
3.
http://pastebin.com/uRsawzE2
Re: 3 Questions -
Rokzlive - 22.12.2011
Whats the function of the vehicles enum to get the name? I cant figure out how that goes :/
Re: 3 Questions -
coole210 - 22.12.2011
Код:
GetVehicleModelIDFromName(vname[]) //Made by Seif_
{
for(new i = 0; i < 211; i++)
{
if(strfind(vehNames[i], vname, true) != -1)
return i + 400;
}
return -1;
}
Re: 3 Questions -
Rokzlive - 22.12.2011
Thats the reverse of what i want, i want the Vehicle name from model, not model from vehicle name.
Re: 3 Questions -
Calgon - 22.12.2011
Subtract 400 from the vehicle ID. ID 0 in the array will be vehicle 400, ID 1 will be vehicle 401, etc.