Eu queria saber como fazer um hotel para os players se hospedarem. O comando seria /alugarquarto. |
if(strfind(playername,"_",true,1)!=-1)
gw=1;
if(playername[strlen(playername)-1]=='_')
gw=0;
for(new i=0;i<strlen(playername);i++)
if((playername[i]<='9')&&(playername[i]>='0'))
gw=0;
if(!gw)
{
SendClientMessage(playerid,COLOR_LIGHTRED,"* Seu nickname nгo estб devidamente correto para conectar-se !");
SendClientMessage(playerid,COLOR_WHITE,"NOTA: Aqui vocк sу poderб jogar com o nickname nos dados 'Nome_Sobrenome',");
SendClientMessage(playerid,COLOR_WHITE,"esse sistema й escolhido pela diversidade de pessoas possнveis a conexгo,");
SendClientMessage(playerid,COLOR_WHITE,"й bem ъtil para facilitar o uso de comandos, funзхes e comunicaзгo social no servidor.");
Kick(playerid);
}
C:\Users\Empresa.Empresa-PC\Desktop\GTA\Meu servidor\Brasil Xtreme Life\gamemodes\BXL.pwn(2433) : error 017: undefined symbol "playername" C:\Users\Empresa.Empresa-PC\Desktop\GTA\Meu servidor\Brasil Xtreme Life\gamemodes\BXL.pwn(2434) : error 017: undefined symbol "gw" C:\Users\Empresa.Empresa-PC\Desktop\GTA\Meu servidor\Brasil Xtreme Life\gamemodes\BXL.pwn(2434) : warning 215: expression has no effect C:\Users\Empresa.Empresa-PC\Desktop\GTA\Meu servidor\Brasil Xtreme Life\gamemodes\BXL.pwn(2435) : error 017: undefined symbol "playername" C:\Users\Empresa.Empresa-PC\Desktop\GTA\Meu servidor\Brasil Xtreme Life\gamemodes\BXL.pwn(2435) : error 017: undefined symbol "playername" C:\Users\Empresa.Empresa-PC\Desktop\GTA\Meu servidor\Brasil Xtreme Life\gamemodes\BXL.pwn(2435) : error 029: invalid expression, assumed zero C:\Users\Empresa.Empresa-PC\Desktop\GTA\Meu servidor\Brasil Xtreme Life\gamemodes\BXL.pwn(2435) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 6 Errors.
new gw,playername[MAX_PLAYER_NAME];
#include <dudb>
new
VehicleNames[212][] =
{
"Landstalker",
"Bravura",
"Buffalo",
"Linerunner",
"Pereniel",
"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",
"Previon",
"Coach",
"Cabbie",
"Stallion",
"Rumpo",
"RC-Bandit",
"Romero",
"Packer",
"Monster",
"Admiral",
"Squalo",
"Seasparrow",
"Pizzaboy",
"Tram",
"Trailer",
"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",
"ZR3-50",
"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",
"Hotring-Racer",
"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",
"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",
"Trailer",
"Kart",
"Mower",
"Duneride",
"Sweeper",
"Broadway",
"Tornado",
"AT-400",
"DFT-30",
"Huntley",
"Stafford",
"BF-400",
"Newsvan",
"Tug",
"Trailer",
"Emperor",
"Wayfarer",
"Euros",
"Hotdog",
"Club",
"Trailer-B",
"Trailer-C",
"Andromada",
"Dodo",
"RC-CaLm",
"Launch",
"Police Car [LSPD]",
"Police Car [SFPD]",
"Police Car [LVPD]",
"Police Ranger",
"Picador",
"S.W.A.T",
"Alpha",
"Phoenix",
"Glendale",
"Sadler",
"Luggage Trailer",
"Luggage Trailer",
"Stair Trailer",
"Boxville",
"Farm Plow",
"Utility Trailer"
};
public OnPlayerCommandText(playerid, cmdtext[])
{
new
cmd[256],
idx,
tmp[256];
cmd = strtok(cmdtext, idx);
if (strcmp("/createcar", cmd, true, 10) == 0)
{
new
ida;
tmp = strtok(cmdtext,idx);
if(strlen(tmp) == 0) return SendClientMessage(playerid, 0xAA3333AA, "Uso: /createcar [Nome/ID]");
if(!IsNumeric(tmp)) ida = GetVehicleModelIDFromName(tmp); else ida = strval(tmp);
if(ida < 400 || ida > 603) return SendClientMessage(playerid ,0xAA3333AA,"Modelo Invalido");
CreatePlayerVehicle(playerid, ida);
return 1;
}
return 1;
}
stock
CreatePlayerVehicle( playerid, modelid )
{
new
vehicle,
Float:xa,
Float:ya,
Float:za,
Float:xa2,
Float:ya2,
Float:za2,
Float:anglea;
if ( GetPlayerState( playerid ) == PLAYER_STATE_DRIVER )
{
vehicle = GetPlayerVehicleID( playerid );
GetVehiclePos( vehicle, xa, ya, za );
GetVehicleZAngle( vehicle, anglea );
GetVehicleVelocity(vehicle,xa2,ya2,za2);
DestroyVehicle( vehicle );
}
else
{
GetPlayerPos( playerid, xa, ya, za );
GetPlayerFacingAngle( playerid, anglea );
}
vehicle = AddStaticVehicle( modelid, xa, ya, ( za + 1 ), anglea,-1,-1);
LinkVehicleToInterior( vehicle, GetPlayerInterior( playerid ) );
SetVehicleVirtualWorld( vehicle, GetPlayerVirtualWorld( playerid ) );
PutPlayerInVehicle( playerid, vehicle, 0 );
PlayerPlaySound(playerid,1133,0,0,0);
SetVehicleVelocity(vehicle,xa2,ya2,za2);
return 1;
}
IsNumeric(const stringf[])
{
for (new g = 0, kho = strlen(stringf); g < kho; g++)
{
if (stringf[g] > '9' || stringf[g] < '0') return 0;
}
return 1;
}
GetVehicleModelIDFromName(vname[])
{
for(new i = 0; i < 211; i++)
{
if ( strfind(VehicleNames[i], vname, true) != -1 )
return i + 400;
}
return -1;
}
if(!IsPlayerNPC(playerid))
{
new
name[24];
GetPlayerName(playerid, name, sizeof(name));
CheckRPName(playerid,name);
}
//no fundo do script...
stock CheckRPName(playerid, name[])
{
new ch = name[0];
if(strfind(name, "_") != -1)
{
if(ch >= 'A' && ch <= 'Z')
{
for(new i=0, j=strlen(name); i < j; i++)
{
if((name[i] >= 0) && (name[i] <= 9))
{
SendClientMessage(playerid, 0xF60000AA, "[Erro:] O teu nome nao pode conter numeros!");
Kick(playerid);
return 0;
}
if(!strfind(name[i], "_"))
{
name[++i];
if(name[i] >= 'A' && name[i] <= 'Z') return 1;
else
{
SendClientMessage(playerid, 0xF60000AA, "[Erro:] O teu ultimo nome deve comeзar com letra maiuscula!");
Kick(playerid);
return 0;
}
}
else continue;
}
return 1;
}
else
{
SendClientMessage(playerid, 0xF60000AA, "[Erro:] O teu Primeiro nome deve comeзar com letra maiuscula!");
Kick(playerid);
return 0;
}
}
else
{
SendClientMessage(playerid, 0xF60000AA, "[Erro:] Entre os nomes deve de ter o caracter _");
Kick(playerid);
return 0;
}
}