CMD:v(playerid, params[])
{
new Vehicle[32], VehicleID, ColorOne, ColorTwo;
PlayerInfo[playerid][pCanSpawnVehicle] = true;
if(sscanf(params, "s[32]D(1)D(1)", Vehicle, ColorOne, ColorTwo))
{
PlayerInfo[playerid][pCanSpawnVehicle] = true;
SendClientMessage(playerid, COLOR_GREY, "[USAGE]: /v[Vehiclename/Vehicleid] [Color 1 (optional)] [Color 2 (optional)]");
SendClientMessage(playerid, COLOR_GREY, "[USAGE]: Like /v Turismo , /v Elegy /v Nrg /v 522");
return 1;
}
if(PlayerInfo[playerid][pCanSpawnVehicle])
{
VehicleID = GetVehicleModelIDFromName(Vehicle);
if(VehicleID != 425 && VehicleID != 432 && VehicleID != 447 &&
VehicleID != 430 && VehicleID != 417 && VehicleID != 435 &&
VehicleID != 446 && VehicleID != 449 && VehicleID != 450 &&
VehicleID != 452 && VehicleID != 453 && VehicleID != 454 &&
VehicleID != 460 && VehicleID != 464 && VehicleID != 465 &&
VehicleID != 469 && VehicleID != 472 && VehicleID != 473 &&
VehicleID != 476 && VehicleID != 484 && VehicleID != 487 &&
VehicleID != 488 && VehicleID != 493 && VehicleID != 497 &&
VehicleID != 501 && VehicleID != 511 && VehicleID != 512 &&
VehicleID != 513 && VehicleID != 519 && VehicleID != 520 &&
VehicleID != 537 && VehicleID != 538 && VehicleID != 548 &&
VehicleID != 553 && VehicleID != 563 && VehicleID != 564 &&
VehicleID != 569 && VehicleID != 570 && VehicleID != 577 &&
VehicleID != 584 && VehicleID != 590 && VehicleID != 591 &&
VehicleID != 592 && VehicleID != 593 && VehicleID != 594 &&
VehicleID != 595 && VehicleID != 606 && VehicleID != 607 &&
VehicleID != 608 && VehicleID != 610 && VehicleID != 611) {
if(VehicleID == -1 )
{
VehicleID = strval(Vehicle);
if(VehicleID < 400 || VehicleID > 611 )
{
return SendClientMessage(playerid, COLOR_GREY, "You entered an invalid vehiclename!");
}
}
GetPlayerPos(playerid, pX, pY, pZ);
GetPlayerFacingAngle(playerid, pAngle);
DestroyVehicle(PlayerInfo[playerid][pSpawnVehicle]);
PlayerInfo[playerid][pSpawnVehicle] = CreateVehicle(VehicleID, pX, pY, pZ+2.0, pAngle, ColorOne, ColorTwo, -1);
LinkVehicleToInterior(PlayerInfo[playerid][pSpawnVehicle], GetPlayerInterior(playerid));
PutPlayerInVehicle(playerid, PlayerInfo[playerid][pSpawnVehicle], 0);
SendClientMessage(playerid, COLOR_GREY, "You succesfully spawned this vehicle!");
} else {
SendClientMessage(playerid, COLOR_GREY, "You are not allowed to spawn this vehicle!!");
}
} else {
SendClientMessage(playerid, COLOR_GREY, "You can not spawn vehicles in this zone!");
}
return 1;
}
C:\Users\William\Desktop\samp03z_svr_R1_win32\gamemodes\aprender.pwn(156) : warning 217: loose indentation
C:\Users\William\Desktop\samp03z_svr_R1_win32\gamemodes\aprender.pwn(156) : error 029: invalid expression, assumed zero
C:\Users\William\Desktop\samp03z_svr_R1_win32\gamemodes\aprender.pwn(156) : error 017: undefined symbol "cmd_v"
C:\Users\William\Desktop\samp03z_svr_R1_win32\gamemodes\aprender.pwn(156) : error 029: invalid expression, assumed zero
C:\Users\William\Desktop\samp03z_svr_R1_win32\gamemodes\aprender.pwn(156) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
CMD:v(playerid, params[])
#define DIALOG_CARS 231
if(!strcmp(cmdtext, "/carro", true))
{
SendClientMessage(playerid, 0xFFFFFFFF, "[INFO] Digite seu Carro");
ShowPlayerDialog(playerid,DIALOG_CARS,DIALOG_STYLE_INPUT,"Carros","Digite id do seu carro abaixo:","Carro","Sair");
return 1;
}
if(dialogid == DIALOG_CARS)
{
if(!response)
return SendClientMessage(playerid, 0xFFFFFFFF, "[INFO] Vocк cancelou a seleзгo de carros");
if(!strval(inputtext))
return SendClientMessage(playerid, 0xFFFFFFFF, "[INFO] Vocк cancelou a seleзгo de carros");
if(!IsValidVehicle(strval(inputtext)))
return SendClientMessage(playerid, 0xFFFFFFFF, "[ERRO] Carro Invбlido");
format(message, sizeof(message), "Vocк colocou o carro %s(%i)", NomeCarros[strval(inputtext)-400],strval(inputtext));
SendClientMessage(playerid, 0xFFFFFFFF, message);
GetPlayerPos(playerid, x, y, z);
PutPlayerInVehicle(playerid,CreateVehicle(strval(inputtext),x, y, z, 82,0,1,60), 0);
PlayerPlaySound(playerid,1133,0.0,0.0,0.0); //sound
return 1;
}
new
NomeCarros[][] =
{
"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 Truck",
"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",
"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",
"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 Truck",
"Monster Truck",
"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",
"Trailer",
"Andromada",
"Dodo",
"RC Cam",
"Launch",
"Police Car (LS)",
"Police Car (SF)",
"Police Car (LV)",
"Police Ranger",
"Picador",
"S.W.A.T. Van",
"Alpha",
"Phoenix",
"Glendale",
"Sadler",
"Luggage Trailer",
"Luggage Trailer",
"Stair Trailer",
"Boxville",
"Farm Plow",
"Utility Trailer"
};
stock IsValidVehicle(modelid)
{
switch(modelid)
{
case 581, 523, 462, 521, 463, 522, 461, 448, 468, 586, 509,
481, 510, 472, 473, 493, 595, 484, 430, 453,
452, 446, 454, 445, 602, 416, 485, 568, 429, 433, 499, 424, 536, 496,
504, 422, 609, 498, 401, 575, 518,
402, 541, 482, 431, 438, 457, 527, 483, 524, 415, 542, 589, 437, 532,
480, 596, 599, 597, 598, 578, 486,
507, 562, 585, 427, 419, 587, 490, 528, 533, 544, 407, 565, 455, 530,
526, 466, 604, 492, 474, 588, 434,
502, 503, 494, 579, 545, 411, 546, 559, 508, 571, 400, 403, 517, 410,
551, 500, 418, 572, 423, 414, 516,
582, 467, 443, 470, 404, 514, 603, 600, 413, 426, 436, 547, 489, 441,
594, 564, 515, 479, 534, 432, 505,
442, 440, 475, 543, 605, 495, 567, 428, 405, 535, 458, 580, 439, 561,
409, 560, 506, 601, 574, 566, 549,
420, 459, 576, 525, 531, 408, 583, 451, 558, 552, 540, 491, 412, 478,
421, 529, 456, 554, 477, 548, 425,
417, 487, 497, 563, 501, 465, 447, 469, 488, 406, 573, 444, 556, 557,
592, 577, 511, 512, 593, 520, 553,
464, 476, 519, 460, 513, 539, 471, 435, 450, 591, 606, 607, 610, 584,
608, 611, 590, 449:
return modelid;
}
return 1;
}
if(strcmp(cmd, "/veh", true) == 0 || strcmp(cmd, "/criarveiculo", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new nome[24];
GetPlayerName(playerid, nome, sizeof nome);
if (PlayerInfo[playerid][pAdmin] > 5000)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USO: /veiculo [carid] [color1] [color2]");
return 1;
}
new car;
car = strval(tmp);
if(car < 400 || car > 611) { SendClientMessage(playerid, COLOR_GREY, " Vehicle Number can't be below 400 ou above 611 !"); return 1; }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USO: /veiculo [carid] [color1] [color2]");
return 1;
}
new color1;
color1 = strval(tmp);
if(color1 < 0 || color1 > 126) { SendClientMessage(playerid, COLOR_GREY, " Color Number can't be below 0 ou above 126 !"); return 1; }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USO: /veiculo [carid] [color1] [color2]");
return 1;
}
new color2;
color2 = strval(tmp);
if(color2 < 0 || color2 > 126) { SendClientMessage(playerid, COLOR_GREY, " Color Number can't be below 0 ou above 126 !"); return 1; }
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid, X,Y,Z);
new carid = CreateVehicle(car, X,Y,Z, 0.0, color1, color2,60000);
CreatedCars[CreatedCar] = carid;
CreatedCar ++;
format(string, sizeof(string), " Veнculo spawnado de nъmero %d;", carid);
SendClientMessage(playerid, COLOR_GREY, string);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Autorizaзгo insuficiente !");
return 1;
}
}
return 1;
}
//--------------- Topo---------------|
new carrocriado[50];
new totalCV;
CMD:c(playerid, params[])
{
new carroid = strval(params);
new Float:X,Float:Y,Float:Z,Float:Angle;
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1,"[ERRO] Vocк nгo й um administrador!");
if(isnull(params)) return SendClientMessage(playerid, -1, "[ERRO] Uso: /C [Carro ID]");
if(carroid >= 400 && carroid <= 611){
GetPlayerPos(playerid,X,Y,Z);
GetPlayerFacingAngle(playerid,Angle);
carrocriado[totalCV] = AddStaticVehicle(carroid, X, Y, Z, Angle, -1, -1);
PutPlayerInVehicle(playerid,carrocriado[totalCV],0);
if(GetPlayerInterior(playerid))
LinkVehicleToInterior(carrocriado[totalCV],GetPlayerInterior(playerid));
SetVehicleVirtualWorld(carrocriado[totalCV],GetPlayerVirtualWorld(playerid));
new string[200];
format(string, sizeof(string), "* Veнculo criado com sucesso [ID:%d]", carroid);
SendClientMessage(playerid, -1, string);
totalCV++;
}
return 1;
}
pawn Код:
|
C:\Users\William\Desktop\samp03z_svr_R1_win32\gamemodes\aprender.pwn(156) : warning 217: loose indentation
C:\Users\William\Desktop\samp03z_svr_R1_win32\gamemodes\aprender.pwn(156) : error 029: invalid expression, assumed zero
C:\Users\William\Desktop\samp03z_svr_R1_win32\gamemodes\aprender.pwn(156) : error 017: undefined symbol "cmd_c"
C:\Users\William\Desktop\samp03z_svr_R1_win32\gamemodes\aprender.pwn(156) : error 029: invalid expression, assumed zero
C:\Users\William\Desktop\samp03z_svr_R1_win32\gamemodes\aprender.pwn(156) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
Identa o cуdigo, E coloque isso no topo do GM: #pragma tabsize 0;
|
pawn Код:
|
if (strcmp("/carro", cmdtext, true, 10) == 0)
{
new carroid;
new Float:X,Float:Y,Float:Z,Float:Angle;
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1,"[ERRO] Vocк nгo й um administrador!");
if(isnull(params)) return SendClientMessage(playerid, -1, "[ERRO] Uso: /C [Carro ID]");
if(carroid >= 400 && carroid <= 611){
GetPlayerPos(playerid,X,Y,Z);
GetPlayerFacingAngle(playerid,Angle);
carrocriado[totalCV] = AddStaticVehicle(carroid, X, Y, Z, Angle, -1, -1);
PutPlayerInVehicle(playerid,carrocriado[totalCV],0);
if(GetPlayerInterior(playerid))
LinkVehicleToInterior(carrocriado[totalCV],GetPlayerInterior(playerid));
SetVehicleVirtualWorld(carrocriado[totalCV],GetPlayerVirtualWorld(playerid));
new string[200];
format(string, sizeof(string), "* Veнculo criado com sucesso [ID:%d]", carroid);
SendClientMessage(playerid, -1, string);
totalCV++;
}
return 1;
}
if(isnull(params)) return SendClientMessage(playerid, -1, "[ERRO] Uso: /C [Carro ID]");
C:\Users\William\Desktop\samp03z_svr_R1_win32\gamemodes\DeathDrift.pwn(419) : error 017: undefined symbol "params" C:\Users\William\Desktop\samp03z_svr_R1_win32\gamemodes\DeathDrift.pwn(419) : error 029: invalid expression, assumed zero C:\Users\William\Desktop\samp03z_svr_R1_win32\gamemodes\DeathDrift.pwn(419) : error 017: undefined symbol "params" C:\Users\William\Desktop\samp03z_svr_R1_win32\gamemodes\DeathDrift.pwn(419) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.