02.06.2010, 21:15
Galera eu queria saber como se faz pra colocar um menu para escolher veiculo quando o player entra no server
Agradeзo pelas respostas
Agradeзo pelas respostas
#include <a_samp>
#include <a_players>
new CARROSGAYS;
public OnFilterScriptInit()
{
CARROSGAYS= CreateMenu("Carros para um Homem", 1, 50.0, 180.0, 200.0, 200.0);
AddMenuItem(CARROSGAYS, 0, "Carro1");
AddMenuItem(CARROSGAYS, 0, "Carro2");
return 1;
}
public OnPlayerSelectedMenuRow(playerid, row)
{
new Menu:current;
current = GetPlayerMenu(playerid);
if(current == CARROSGAYS)
{
switch(row)
{
case 0:{
new Float:Angle;
new Float:X;
new Float:Y;
new Float:Z;
GetPlayerFacingAngle(playerid, Angle);
GetPlayerPos(playerid,X,Y,Z);
CreateVehicle(520, X, Y, Z, Angle, 0, 1, 60);
}
case 1:{
//Row 2 code
new Float:Angle;
new Float:X;
new Float:Y;
new Float:Z;
GetPlayerFacingAngle(playerid, Angle);
GetPlayerPos(playerid,X,Y,Z);
CreateVehicle(411, X, Y, Z, Angle, 0, 1, 60);
}
}
return 1;
}
public onPlayerConnect(playerid)
{
ShowMenuForPlayer(CARROSGAYS, playerid);
return 1;
}