i must learn but my friend want to have this script today so pls can you add to reapair this shit :P ?
Код:
#include <a_samp>
new VHACAR;
new cmd[256];
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/VHAV", true) == 0)
{
if (IsPlayerAdmin(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_ORANGE, "Uzyj: /VHAV [nazwa/id] [color1] [color2]");
return 1;
}
new car = GetVehicleModelIDFromName(tmp);
if (car == -1)
{
car = strval(tmp);
if(car < 400 || car > 611) return SendClientMessage(playerid, COLOR_RED, "ID pojazdow sa od 400 do 611 !");
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_ORANGE, "Uzyj: /VHVA [nazwa/id] [color1] [color2]");
return 1;
}
new color1 = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_ORANGE, "Uzyj: /VHVA [nazwa/id] [color1] [color2]");
return 1;
}
new color2 = strval(tmp);
new Float:X,Float:Y,Float:Z,Float:A;
GetPlayerPos(playerid, X,Y,Z);
GetPlayerFacingAngle(playerid, A);
X += (5 * floatsin(-A, degrees));
Y += (5 * floatcos(-A, degrees));
VHACAR = CreateVehicle(car, X,Y,Z, 0.0, color1, color2, 600000000);
format(string, sizeof(string), "Zespawnowales %s(%d). Milej zabawy.", VehNames[GetVehicleModel(VHACAR)-400], VHACAR);
SendClientMessage(playerid, COLOR_LIGHTGREEN, string);
GetPlayerName(playerid,sendername,sizeof(sendername));
format(string, sizeof(string), "Vice Head Admin %s zespawnowal (%d Pojazd Na Mapie) [ Model: %s ]", sendername, VHACAR, VehNames[GetVehicleModel(VHACAR)-400]);
SendClientMessageToAdmins(COLOR_LIGHTBLUE, string);
}
return 1;
}
//Do Respawnu:
if(strcmp(cmdtext, "/VHAR", true)==0 && IsPlayerAdmin(playerid))
{
for(new i=400; i<611; i++)DestroyVehicle(i);
format(string, sizeof(string), "Vice Head Admin %s Zrespawnował Pojazdy");
SendClientMessageToAll(COLOR_LIGHTRED, string);
return true;
}
return 1;
}
you are using VehNames[GetVehicleModel(VHACAR)-400] ... this is most likely causing your error... post the VehNames array
C:\Documents and Settings\ok\Pulpit\spawn.pwn(27) : error 017: undefined symbol "COLOR_ORANGE"