[AJUDA]Veiculos -
Victor_Souz4 - 08.12.2011
o erro eo seguinte galera tipo crio um veiculo ate ai ta tudo certo so eu posso entrar nele mais so que todos os veiculos que eu entro eu sou ejetado e fala que naum sou dono sendo que naum e de ninguem o veiculo:
pawn Код:
//Creditos By: Rhay_Fither Sistema de Veiculo proprio// Site: http://www.sampawno.blogspot.com ou http://www.brasilsampawno.tk// Brasil SamPawno - Tudo Para seu Server SA-MP// Obrigado Por nos escolher//COntato: G.Vsuelitonpc@hotmail.com#include <a_samp>new vModel,
Float:ppos
[3],
Text3D:TextVeH,
VeiculoID
[MAX_PLAYERS
],
gstring
[256];
new Veiculos
[212][] ={ {"Landstalker"},
{"Bravura"},
{"Buffalo"},
{"Linerunner"},
{"Perrenial"},
{"Sentinel"},
{"Dumper"},
{"Firetruck"},
{"Trashmaster"},
{"Stretch"},
{"Manana"},
{"Infernus"},
{"Voodoo"},
{"Pony"},
{"Mule"},
{"Cheetah"},
{"Ambulance"},
{"Leviathan"},
{"Moonbeam"},
{"Esperanto"},
{"Taxi"},
{"Washington"},
{"Bobcat"},
{"Mr Whoopee"},
{"BF Injection"},
{"Hunter"},
{"Premier"},
{"Enforcer"},
{"Securicar"},
{"Banshee"},
{"Predator"},
{"Bus"},
{"Rhino"},
{"Barracks"},
{"Hotknife"},
{"Trailer 1"},
{"Previon"},
{"Coach"},
{"Cabbie"},
{"Stallion"},
{"Rumpo"},
{"RC Bandit"},
{"Romero"},
{"Packer"},
{"Monster"},
{"Admiral"},
{"Squalo"},
{"Seasparrow"},
{"Pizzaboy"},
{"Tram"},
{"Trailer 2"},
{"Turismo"},
{"Speeder"},
{"Reefer"},
{"Tropic"},
{"Flatbed"},
{"Yankee"},
{"Caddy"},
{"Solair"},
{"Berkley's RC Van"},
{"Skimmer"},
{"PCJ-600"},
{"Faggio"},
{"Freeway"},
{"RC Baron"},
{"RC Raider"},
{"Glendale"},
{"Oceanic"},
{"Sanchez"},
{"Sparrow"},
{"Patriot"},
{"Quad"},
{"Coastguard"},
{"Dinghy"},
{"Hermes"},
{"Sabre"},
{"Rustler"},
{"ZR-350"},
{"Walton"},
{"Regina"},
{"Comet"},
{"BMX"},
{"Burrito"},
{"Camper"},
{"Marquis"},
{"Baggage"},
{"Dozer"},
{"Maverick"},
{"News Chopper"},
{"Rancher"},
{"FBI Rancher"},
{"Virgo"},
{"Greenwood"},
{"Jetmax"},
{"Hotring"},
{"Sandking"},
{"Blista Compact"},
{"Police Maverick"},
{"Boxville"},
{"Benson"},
{"Mesa"},
{"RC Goblin"},
{"Hotring Racer A"},
{"Hotring Racer B"},
{"Bloodring Banger"},
{"Rancher"},
{"Super GT"},
{"Elegant"},
{"Journey"},
{"Bike"},
{"Mountain Bike"},
{"Beagle"},
{"Cropdust"},
{"Stunt"},
{"Tanker"},
{"Roadtrain"},
{"Nebula"},
{"Majestic"},
{"Buccaneer"},
{"Shamal"},
{"Hydra"},
{"FCR-900"},
{"NRG-500"},
{"HPV1000"},
{"Cement Truck"},
{"Tow Truck"},
{"Fortune"},
{"Cadrona"},
{"FBI Truck"},
{"Willard"},
{"Forklift"},
{"Tractor"},
{"Combine"},
{"Feltzer"},
{"Remington"},
{"Slamvan"},
{"Blade"},
{"Freight"},
{"Streak"},
{"Vortex"},
{"Vincent"},
{"Bullet"},
{"Clover"},
{"Sadler"},
{"Firetruck LA"},
{"Hustler"},
{"Intruder"},
{"Primo"},
{"Cargobob"},
{"Tampa"},
{"Sunrise"},
{"Merit"},
{"Utility"},
{"Nevada"},
{"Yosemite"},
{"Windsor"},
{"Monster A"},
{"Monster B"},
{"Uranus"},
{"Jester"},
{"Sultan"},
{"Stratum"},
{"Elegy"},
{"Raindance"},
{"RC Tiger"},
{"Flash"},
{"Tahoma"},
{"Savanna"},
{"Bandito"},
{"Freight Flat"},
{"Streak Carriage"},
{"Kart"},
{"Mower"},
{"Duneride"},
{"Sweeper"},
{"Broadway"},
{"Tornado"},
{"AT-400"},
{"DFT-30"},
{"Huntley"},
{"Stafford"},
{"BF-400"},
{"Newsvan"},
{"Tug"},
{"Trailer 3"},
{"Emperor"},
{"Wayfarer"},
{"Euros"},
{"Hotdog"},
{"Club"},
{"Freight Carriage"},
{"Trailer 3"},
{"Andromada"},
{"Dodo"},
{"RC Cam"},
{"Launch"},
{"Police Car (LSPD)"},
{"Police Car (SFPD)"},
{"Police Car (LVPD)"},
{"Police Ranger"},
{"Picador"},
{"S.W.A.T. Van"},
{"Alpha"},
{"Phoenix"},
{"Glendale"},
{"Sadler"},
{"Luggage Trailer A"},
{"Luggage Trailer B"},
{"Stair Trailer"},
{"Boxville"},
{"Farm Plow"},
{"Utility Trailer"}};
public OnPlayerConnect
(playerid
){ VeiculoID
[playerid
] = -1;
return 1;
}public OnPlayerDisconnect
(playerid, reason
){ DestroyVehicle
(VeiculoID
[playerid
]);
VeiculoID
[playerid
] = -1;
return 1;
}public OnPlayerCommandText
(playerid, cmdtext
[]){ new cmd
[128], idx, tmp
[128];
cmd
= strtok
(cmdtext, idx
);
GetPlayerPos
(playerid, ppos
[0], ppos
[1], ppos
[2]);
if(strcmp(cmd,
"/veh", true
) == 0 ||
strcmp(cmd,
"/criarveiculo", true
) == 0) { tmp
= strtok
(cmdtext, idx
);
if(!strlen(tmp
)) { SendClientMessage
(playerid, 0xFF3300AA,
"| ERRO | Uso correto: /veh [id veнculo] [cor1] [cor2]");
return 1;
} new veiculo
= strval(tmp
);
if(veiculo
< 400 || veiculo
> 611) { SendClientMessage
(playerid, 0xFF3300AA,
"| ERRO | Somente veнculos entre os ID: 400 б 611");
return 1;
} tmp
= strtok
(cmdtext, idx
);
if(!strlen(tmp
)) { SendClientMessage
(playerid, 0xFF3300AA,
"| ERRO | Uso correto: /veh [id veнculo] [cor1] [cor2]");
return 1;
} new color1
= strval(tmp
);
tmp
= strtok
(cmdtext, idx
);
new color2
= strval(tmp
);
if(!strlen(tmp
)) { SendClientMessage
(playerid, 0xFF3300AA,
"| ERRO | Uso correto: /veh [id veнculo] [cor1] [cor2]");
return 1;
} DestroyVehicle
(VeiculoID
[playerid
]);
vModel
= CreateVehicle
(veiculo, ppos
[0], ppos
[1], ppos
[2],
360, color1, color2,
-1);
PutPlayerInVehicle
(playerid, vModel,
0);
VeiculoID
[playerid
] = GetPlayerVehicleID
(playerid
);
format(gstring,
sizeof(gstring
),
"| INFO | %s id: %d cor1 %d e cor2 %d criado com sucesso!", Veiculos
[GetVehicleModel
(vModel
)-400], veiculo, color1, color2
);
SendClientMessage
(playerid, 0xFFFF33AA, gstring
);
format(gstring,
256,
"{FFFF33}Veнculo de {FFFFCC}%s {FFFF33}id {FFFFCC}%d", PlayerName
(playerid
), playerid
);
TextVeH
= Create3DTextLabel
(gstring,
-1,
0.0,
0.0,
0.0,
50.0,
0,
1);
Attach3DTextLabelToVehicle
(TextVeH, vModel,
0.0,
0.0,
0.0+1);
return 1;
} return 0;
}public OnPlayerStateChange
(playerid, newstate, oldstate
){ if(IsPlayerInAnyVehicle
(playerid
)) { if(GetPlayerVehicleID
(playerid
) == VeiculoID
[playerid
]) { return 1;
} else if(GetPlayerVehicleID
(playerid
) != VeiculoID
[playerid
]) { format(gstring,
sizeof(gstring
),
"| ERRO | Esse veнculo pertence а %s e vocк nгo pode dirigi-lo! {99FF66}( Crie o seu usando: /Veh )", PlayerName
(VeiculoID
[playerid
]));
SendClientMessage
(playerid, 0xFF6633AA, gstring
);
PlayerPlaySound
(playerid,
1147,
0.0,
0.0,
0.0);
RemovePlayerFromVehicle
(playerid
);
return 1;
} } return 1;
}stock strtok
(const string
[],
&index
){ new length
= strlen(string
);
while ((index
< length
) && (string
[index
] <= ' ')) { index
++;
} new offset
= index;
new result
[20];
while ((index
< length
) && (string
[index
] > ' ') && ((index
- offset
) < (sizeof(result
) - 1))) { result
[index
- offset
] = string
[index
];
index
++;
} result
[index
- offset
] = EOS;
return result;
}stock GetVehicleModelID
(nome
[]){ for(new i
= 0; i
< 211;
++i
) { if(strfind(Veiculos
[i
], nome, true
) != -1) return i
+ 400;
} return -1;
}stock PlayerName
(playerid
){ new PvName
[MAX_PLAYER_NAME
+1] ;
GetPlayerName
(playerid, PvName,
sizeof(PvName
));
return PvName;
}
Re: [AJUDA]Veiculos -
Cristhian - 08.12.2011
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(IsPlayerInAnyVehicle(playerid))
{
if(GetPlayerVehicleID(playerid) == VeiculoID[playerid])
{
return 1;
}
else
{
format(gstring, sizeof(gstring), "| ERRO | Esse veнculo pertence а %s e vocк nгo pode dirigi-lo! {99FF66}( Crie o seu usando: /Veh )", PlayerName(VeiculoID[playerid]));
SendClientMessage(playerid, 0xFF6633AA, gstring);
PlayerPlaySound(playerid, 1147, 0.0, 0.0, 0.0);
RemovePlayerFromVehicle(playerid);
return 1;
}
}
return 1;
}
tente
Re: [AJUDA]Veiculos -
Victor_Souz4 - 08.12.2011
Continua a mesma lek :/ entro em qualquer veiculo me retorna a messagem de que o veiculo naum e meu.. ai tenho que criar um no /veh
Re: [AJUDA]Veiculos -
Cristhian - 08.12.2011
vc quer que o player possa entrar em qualquer veiculo ?
Re: [AJUDA]Veiculos -
Victor_Souz4 - 08.12.2011
Quote:
Originally Posted by Cristhian
vc quer que o player possa entrar em qualquer veiculo ?
|
Sim so nao quero tipo ex: eu crio um veiculo no comando /veh ai ninguem pode entrar e retorna aquela menssagem.
mais so que todos os veiculos que entro fala que naum e meu..
Re: [AJUDA]Veiculos -
Cristhian - 08.12.2011
msm sendo o seu ?
Re: [AJUDA]Veiculos -
Victor_Souz4 - 08.12.2011
ai sendo meu naum acontece isso.. mmais todos os veiculos que naum e criado por ninguem retorna essa menssagem so queria que retornasse quando o veiculo for de alguem
Re: [AJUDA]Veiculos -
Cristhian - 08.12.2011
pawn Код:
new bool:VeiculoID[MAX_PLAYERS][MAX_VEHICLES];
new car;
pawn Код:
public OnPlayerConnect(playerid)
{
for(new v = 0; v < MAX_VEHICLES; v++)
{
VeiculoID[playerid][v] = false;
}
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
DestroyVehicle(VeiculoID[playerid][car]);
VeiculoID[playerid][car] = false;
return 1;
}
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
new
cmd[128], idx, tmp[128];
cmd = strtok(cmdtext, idx);
GetPlayerPos(playerid, ppos[0], ppos[1], ppos[2]);
if(strcmp(cmd, "/veh", true) == 0 || strcmp(cmd, "/criarveiculo", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, 0xFF3300AA, "| ERRO | Uso correto: /veh [id veнculo] [cor1] [cor2]");
return 1;
}
new
veiculo = strval(tmp);
if(veiculo < 400 || veiculo > 611)
{
SendClientMessage(playerid, 0xFF3300AA, "| ERRO | Somente veнculos entre os ID: 400 б 611");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, 0xFF3300AA, "| ERRO | Uso correto: /veh [id veнculo] [cor1] [cor2]");
return 1;
}
new
color1 = strval(tmp);
tmp = strtok(cmdtext, idx);
new
color2 = strval(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, 0xFF3300AA, "| ERRO | Uso correto: /veh [id veнculo] [cor1] [cor2]");
return 1;
}
car = veiculo;
DestroyVehicle(VeiculoID[playerid][car]);
vModel = CreateVehicle(veiculo, ppos[0], ppos[1], ppos[2], 360, color1, color2, -1);
PutPlayerInVehicle(playerid, vModel, 0);
VeiculoID[playerid][car] = true;
format(gstring, sizeof(gstring), "| INFO | %s id: %d cor1 %d e cor2 %d criado com sucesso!", Veiculos[GetVehicleModel(vModel)-400], veiculo, color1, color2);
SendClientMessage(playerid, 0xFFFF33AA, gstring);
format(gstring, 256, "{FFFF33}Veнculo de {FFFFCC}%s {FFFF33}id {FFFFCC}%d", PlayerName(playerid), playerid);
TextVeH = Create3DTextLabel(gstring, -1, 0.0, 0.0, 0.0, 50.0, 0, 1);
Attach3DTextLabelToVehicle(TextVeH, vModel, 0.0, 0.0, 0.0+1);
return 1;
}
return 0;
}
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(IsPlayerInAnyVehicle(playerid))
{
if(GetPlayerVehicleID(playerid) == car)
{
return 1;
}
else
{
format(gstring, sizeof(gstring), "| ERRO | Esse veнculo pertence а %s e vocк nгo pode dirigi-lo! {99FF66}( Crie o seu usando: /Veh )", PlayerName(VeiculoID[playerid][car]));
SendClientMessage(playerid, 0xFF6633AA, gstring);
PlayerPlaySound(playerid, 1147, 0.0, 0.0, 0.0);
RemovePlayerFromVehicle(playerid);
return 1;
}
}
return 1;
}
tenta .-.
editei ali /\
Re: [AJUDA]Veiculos -
Victor_Souz4 - 08.12.2011
Ajuda ae agora todos podem entrar no veiculo que eu criar.. queria que so eu pudesse entrar.
pawn Код:
//Creditos By: Rhay_Fither Sistema de Veiculo proprio// Site: http://www.sampawno.blogspot.com ou http://www.brasilsampawno.tk// Brasil SamPawno - Tudo Para seu Server SA-MP// Obrigado Por nos escolher//COntato: G.Vsuelitonpc@hotmail.com#include <a_samp>newvModel,
Float:ppos
[3],
Text3D:TextVeH,
VeiculoID
[MAX_PLAYERS
],
gstring
[256];
new Veiculos
[212][] ={ {"Landstalker"},
{"Bravura"},
{"Buffalo"},
{"Linerunner"},
{"Perrenial"},
{"Sentinel"},
{"Dumper"},
{"Firetruck"},
{"Trashmaster"},
{"Stretch"},
{"Manana"},
{"Infernus"},
{"Voodoo"},
{"Pony"},
{"Mule"},
{"Cheetah"},
{"Ambulance"},
{"Leviathan"},
{"Moonbeam"},
{"Esperanto"},
{"Taxi"},
{"Washington"},
{"Bobcat"},
{"Mr Whoopee"},
{"BF Injection"},
{"Hunter"},
{"Premier"},
{"Enforcer"},
{"Securicar"},
{"Banshee"},
{"Predator"},
{"Bus"},
{"Rhino"},
{"Barracks"},
{"Hotknife"},
{"Trailer 1"},
{"Previon"},
{"Coach"},
{"Cabbie"},
{"Stallion"},
{"Rumpo"},
{"RC Bandit"},
{"Romero"},
{"Packer"},
{"Monster"},
{"Admiral"},
{"Squalo"},
{"Seasparrow"},
{"Pizzaboy"},
{"Tram"},
{"Trailer 2"},
{"Turismo"},
{"Speeder"},
{"Reefer"},
{"Tropic"},
{"Flatbed"},
{"Yankee"},
{"Caddy"},
{"Solair"},
{"Berkley's RC Van"},
{"Skimmer"},
{"PCJ-600"},
{"Faggio"},
{"Freeway"},
{"RC Baron"},
{"RC Raider"},
{"Glendale"},
{"Oceanic"},
{"Sanchez"},
{"Sparrow"},
{"Patriot"},
{"Quad"},
{"Coastguard"},
{"Dinghy"},
{"Hermes"},
{"Sabre"},
{"Rustler"},
{"ZR-350"},
{"Walton"},
{"Regina"},
{"Comet"},
{"BMX"},
{"Burrito"},
{"Camper"},
{"Marquis"},
{"Baggage"},
{"Dozer"},
{"Maverick"},
{"News Chopper"},
{"Rancher"},
{"FBI Rancher"},
{"Virgo"},
{"Greenwood"},
{"Jetmax"},
{"Hotring"},
{"Sandking"},
{"Blista Compact"},
{"Police Maverick"},
{"Boxville"},
{"Benson"},
{"Mesa"},
{"RC Goblin"},
{"Hotring Racer A"},
{"Hotring Racer B"},
{"Bloodring Banger"},
{"Rancher"},
{"Super GT"},
{"Elegant"},
{"Journey"},
{"Bike"},
{"Mountain Bike"},
{"Beagle"},
{"Cropdust"},
{"Stunt"},
{"Tanker"},
{"Roadtrain"},
{"Nebula"},
{"Majestic"},
{"Buccaneer"},
{"Shamal"},
{"Hydra"},
{"FCR-900"},
{"NRG-500"},
{"HPV1000"},
{"Cement Truck"},
{"Tow Truck"},
{"Fortune"},
{"Cadrona"},
{"FBI Truck"},
{"Willard"},
{"Forklift"},
{"Tractor"},
{"Combine"},
{"Feltzer"},
{"Remington"},
{"Slamvan"},
{"Blade"},
{"Freight"},
{"Streak"},
{"Vortex"},
{"Vincent"},
{"Bullet"},
{"Clover"},
{"Sadler"},
{"Firetruck LA"},
{"Hustler"},
{"Intruder"},
{"Primo"},
{"Cargobob"},
{"Tampa"},
{"Sunrise"},
{"Merit"},
{"Utility"},
{"Nevada"},
{"Yosemite"},
{"Windsor"},
{"Monster A"},
{"Monster B"},
{"Uranus"},
{"Jester"},
{"Sultan"},
{"Stratum"},
{"Elegy"},
{"Raindance"},
{"RC Tiger"},
{"Flash"},
{"Tahoma"},
{"Savanna"},
{"Bandito"},
{"Freight Flat"},
{"Streak Carriage"},
{"Kart"},
{"Mower"},
{"Duneride"},
{"Sweeper"},
{"Broadway"},
{"Tornado"},
{"AT-400"},
{"DFT-30"},
{"Huntley"},
{"Stafford"},
{"BF-400"},
{"Newsvan"},
{"Tug"},
{"Trailer 3"},
{"Emperor"},
{"Wayfarer"},
{"Euros"},
{"Hotdog"},
{"Club"},
{"Freight Carriage"},
{"Trailer 3"},
{"Andromada"},
{"Dodo"},
{"RC Cam"},
{"Launch"},
{"Police Car (LSPD)"},
{"Police Car (SFPD)"},
{"Police Car (LVPD)"},
{"Police Ranger"},
{"Picador"},
{"S.W.A.T. Van"},
{"Alpha"},
{"Phoenix"},
{"Glendale"},
{"Sadler"},
{"Luggage Trailer A"},
{"Luggage Trailer B"},
{"Stair Trailer"},
{"Boxville"},
{"Farm Plow"},
{"Utility Trailer"}};
public OnPlayerConnect
(playerid
){ VeiculoID
[playerid
] = -1;
return 1;
}public OnPlayerDisconnect
(playerid, reason
){ DestroyVehicle
(VeiculoID
[playerid
]);
VeiculoID
[playerid
] = -1;
return 1;
}public OnPlayerCommandText
(playerid, cmdtext
[]){ new cmd
[128], idx, tmp
[128];
cmd
= strtok
(cmdtext, idx
);
GetPlayerPos
(playerid, ppos
[0], ppos
[1], ppos
[2]);
if(strcmp(cmd,
"/veh", true
) == 0 ||
strcmp(cmd,
"/criarveiculo", true
) == 0) { tmp
= strtok
(cmdtext, idx
);
if(!strlen(tmp
)) { SendClientMessage
(playerid, 0xFF3300AA,
"| ERRO | Uso correto: /veh [id veнculo] [cor1] [cor2]");
return 1;
} new veiculo
= strval(tmp
);
if(veiculo
< 400 || veiculo
> 611) { SendClientMessage
(playerid, 0xFF3300AA,
"| ERRO | Somente veнculos entre os ID: 400 б 611");
return 1;
} tmp
= strtok
(cmdtext, idx
);
if(!strlen(tmp
)) { SendClientMessage
(playerid, 0xFF3300AA,
"| ERRO | Uso correto: /veh [id veнculo] [cor1] [cor2]");
return 1;
} new color1
= strval(tmp
);
tmp
= strtok
(cmdtext, idx
);
new color2
= strval(tmp
);
if(!strlen(tmp
)) { SendClientMessage
(playerid, 0xFF3300AA,
"| ERRO | Uso correto: /veh [id veнculo] [cor1] [cor2]");
return 1;
} vModel
= CreateVehicle
(veiculo, ppos
[0], ppos
[1], ppos
[2],
360, color1, color2,
-1);
PutPlayerInVehicle
(playerid, vModel,
0);
VeiculoID
[playerid
] = GetPlayerVehicleID
(playerid
);
DestroyVehicle
(VeiculoID
[playerid
]);
format(gstring,
sizeof(gstring
),
"| INFO | %s id: %d cor1 %d e cor2 %d criado com sucesso!", Veiculos
[GetVehicleModel
(vModel
)-400], veiculo, color1, color2
);
SendClientMessage
(playerid, 0xFFFF33AA, gstring
);
format(gstring,
256,
"{FFFF33}Veнculo de {FFFFCC}%s {FFFF33}id {FFFFCC}%d", PlayerName
(playerid
), playerid
);
TextVeH
= Create3DTextLabel
(gstring,
-1,
0.0,
0.0,
0.0,
50.0,
0,
1);
Attach3DTextLabelToVehicle
(TextVeH, vModel,
0.0,
0.0,
0.0+1);
return 1;
} return 0;
}public OnPlayerStateChange
(playerid, newstate, oldstate
){ if(newstate
== PLAYER_STATE_DRIVER
) { if(strcmp(VeiculoID
[GetPlayerVehicleID
(playerid
)], PlayerName
(playerid
), false
)) { new g_string
[128];
format(g_string,
sizeof(g_string
),
"| ERRO | Veнculo prуprio do(a) %s somente ele(a) pode dirigi-lo!", VeiculoID
[GetPlayerVehicleID
(playerid
)]);
SendClientMessage
(playerid, 0xFF6633AA, g_string
);
PlayerPlaySound
(playerid,
1147,
0.0,
0.0,
0.0);
RemovePlayerFromVehicle
(playerid
);
return 1;
} return 1;
} return 1;
}stock strtok
(const string
[],
&index
){ new length
= strlen(string
);
while ((index
< length
) && (string
[index
] <= ' ')) { index
++;
} new offset
= index;
new result
[20];
while ((index
< length
) && (string
[index
] > ' ') && ((index
- offset
) < (sizeof(result
) - 1))) { result
[index
- offset
] = string
[index
];
index
++;
} result
[index
- offset
] = EOS;
return result;
}stock GetVehicleModelID
(nome
[]){ for(new i
= 0; i
< 211;
++i
) { if(strfind(Veiculos
[i
], nome, true
) != -1) return i
+ 400;
} return -1;
}stock PlayerName
(playerid
){ new PvName
[MAX_PLAYER_NAME
+1] ;
GetPlayerName
(playerid, PvName,
sizeof(PvName
));
return PvName;
}
Re: [AJUDA]Veiculos -
Victor_Souz4 - 08.12.2011
edit ali emcima