Detaljan opis problema:Nece da kompiluje pawno ne radi sa ovom komandom pravio sam da se pali i gasi neon,u strcmp pa ako neko zna pomoc.Nemojte stavljati ZCMD treba mi vec samo STRCMP.
Dio skripte:
Neke slike/video za lakse dobivanje pomoci(neobavezno):
if (strcmp(cmd, "/neon", true) == 0)
{
if(!IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COLOR_WHITE, "Nisi u automobilu!");
return 1;
}
new VID = GetPlayerVehicleID(playerid);
if(CarInfo != 0)
{
if(strcmp(tmp, "On", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "KORISTENJE: /neon On");
return 1;
}
new globalstrings;
if(Neon == 1) return SendClientMessage(playerid, COLOR_RED, "Na ovom vozilu su vec postavljene neonke!");
Neon = 1;
NeonObject1 = CreateObject(CarInfo,0,0,0,0,0,0);
NeonObject2 = CreateObject(CarInfo,0,0,0,0,0,0);
AttachObjectToVehicle(NeonObject1, VID, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(NeonObject2, VID, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
format(globalstrings, sizeof(globalstrings), "* %s pritisce dugme na komodi i postavlja neonke.", ReturnPVarString(playerid, "ImePrezime"));
ProxDetector(30.0, playerid, globalstrings, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
return 1;
}
if(strcmp(tmp, "Off", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "KORISTENJE: /neon Off");
return 1;
}
new globalstrings;
if(Neon == 0) return SendClientMessage(playerid, COLOR_RED, "Na ovom vozilu neonke nisu postavljene!");
Neon = 0;
DestroyObject(NeonObject1);
DestroyObject(NeonObject2);
format(globalstrings, sizeof(globalstrings), "* %s pritisce gumb na komodi i uvlaci neonke.", ReturnPVarString(playerid, "ImePrezime"));
ProxDetector(30.0, playerid, globalstrings, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
return 1;
}
default:
{
SendClientMessage(playerid, COLOR_RED, "Pogresna akcija! /neon ");
SendClientMessage(playerid, COLOR_RED, "Akcije: 1 = On, 2 = Off");
}
}
}
else SendClientMessage(playerid, COLOR_RED, "Nemas ugradjene neonke u ovom automobilu!");
return 1;
}
