Skripta koju koristim:Svoj gamemod od 0
Detaljan opis problema:Neće mi compilat ovu skriptu,piše ono not responding i neznam jel ju trebam staviti pod public neki ili?
Dio skripte:
if(strcmp( cmdtext, "/createvehicle", true) == 0)
new tmp, tmp2, tmp3;
tmp = strtok(cmdtext, idx);
tmp2 = strtok(cmdtext, idx);
tmp3 = strtok(cmdtext, idx);
new model = strval(tmp);
new color1 = strval(tmp2);
new color2 = strval(tmp3);
if(!strlen(tmp)}{
SendClientMessage(playerid, COLOR_YELLOW, "You did not type a model id.");
return 1;
}
if(!strlen(tmp2)}{
SendClientMessage(playerid, COLOR_YELLOW, "You did not type a primary color id.");
return 1;
}
if(!strlen(tmp3)}{
SendClientMessage(playerid, COLOR_YELLOW, "You did not type a secondary color id.");
return 1;
}
new Float:x, Float:y, Float:z, Float:a;
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, a);
CreateVehicle(model, x, y+2, z+1, a, color1, color2, -1);
new string
format(string, sizeof(string), "You created a Vehicle Model: %d with ColorID1: %d and ColorID2": %d.", model, color);
SendClientMessage(playerid, COLOR_YELLOW, string);
return 1;
}
if(strcmp(cmdtext,"/repairavehicle",true)==0) {
if(!IsPlayerInAnyVehicle(playerid)}{
SendClientMessage(playerid, COLOR_YELLOW, "You need to be in vehicle to use this command .")
return 1;
}
new vehicleid = GetPlayerVehicleID(playerid);
new string;
format(string, sizeof(string), "You repaired vehicle ID: %d.", vehicleid);
SendClientMessage(playerid, COLOR_YELLOW, string);
RepairVehicle(vehicleid);
return 1;
}
Neke slike/video za lakse dobivanje pomoci(neobavezno):
[Pomoc] Command /createvehicle i /repairvehicle
454
pregleda
2
postova
15. Dec. 2012.
21. Dec. 2012.
kristijan250 wrote on December 15, 2012, 8:19 pm:
Skripta koju koristim:Svoj gamemod od 0
Detaljan opis problema:Neće mi compilat ovu skriptu,piše ono not responding i neznam jel ju trebam staviti pod public neki ili?
Dio skripte:
if(strcmp( cmdtext, "/createvehicle", true) == 0)
new tmp, tmp2, tmp3;
tmp = strtok(cmdtext, idx);
tmp2 = strtok(cmdtext, idx);
tmp3 = strtok(cmdtext, idx);
new model = strval(tmp);
new color1 = strval(tmp2);
new color2 = strval(tmp3);
if(!strlen(tmp)}{
SendClientMessage(playerid, COLOR_YELLOW, "You did not type a model id.");
return 1;
}
if(!strlen(tmp2)}{
SendClientMessage(playerid, COLOR_YELLOW, "You did not type a primary color id.");
return 1;
}
if(!strlen(tmp3)}{
SendClientMessage(playerid, COLOR_YELLOW, "You did not type a secondary color id.");
return 1;
}
new Float:x, Float:y, Float:z, Float:a;
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, a);
CreateVehicle(model, x, y+2, z+1, a, color1, color2, -1);
new string
format(string, sizeof(string), "You created a Vehicle Model: %d with ColorID1: %d and ColorID2": %d.", model, color);
SendClientMessage(playerid, COLOR_YELLOW, string);
return 1;
}
if(strcmp(cmdtext,"/repairavehicle",true)==0) {
if(!IsPlayerInAnyVehicle(playerid)}{
SendClientMessage(playerid, COLOR_YELLOW, "You need to be in vehicle to use this command .")
return 1;
}
new vehicleid = GetPlayerVehicleID(playerid);
new string;
format(string, sizeof(string), "You repaired vehicle ID: %d.", vehicleid);
SendClientMessage(playerid, COLOR_YELLOW, string);
RepairVehicle(vehicleid);
return 1;
}
Neke slike/video za lakse dobivanje pomoci(neobavezno):
Detaljan opis problema:Neće mi compilat ovu skriptu,piše ono not responding i neznam jel ju trebam staviti pod public neki ili?
Dio skripte:
if(strcmp( cmdtext, "/createvehicle", true) == 0)
new tmp, tmp2, tmp3;
tmp = strtok(cmdtext, idx);
tmp2 = strtok(cmdtext, idx);
tmp3 = strtok(cmdtext, idx);
new model = strval(tmp);
new color1 = strval(tmp2);
new color2 = strval(tmp3);
if(!strlen(tmp)}{
SendClientMessage(playerid, COLOR_YELLOW, "You did not type a model id.");
return 1;
}
if(!strlen(tmp2)}{
SendClientMessage(playerid, COLOR_YELLOW, "You did not type a primary color id.");
return 1;
}
if(!strlen(tmp3)}{
SendClientMessage(playerid, COLOR_YELLOW, "You did not type a secondary color id.");
return 1;
}
new Float:x, Float:y, Float:z, Float:a;
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, a);
CreateVehicle(model, x, y+2, z+1, a, color1, color2, -1);
new string
format(string, sizeof(string), "You created a Vehicle Model: %d with ColorID1: %d and ColorID2": %d.", model, color);
SendClientMessage(playerid, COLOR_YELLOW, string);
return 1;
}
if(strcmp(cmdtext,"/repairavehicle",true)==0) {
if(!IsPlayerInAnyVehicle(playerid)}{
SendClientMessage(playerid, COLOR_YELLOW, "You need to be in vehicle to use this command .")
return 1;
}
new vehicleid = GetPlayerVehicleID(playerid);
new string;
format(string, sizeof(string), "You repaired vehicle ID: %d.", vehicleid);
SendClientMessage(playerid, COLOR_YELLOW, string);
RepairVehicle(vehicleid);
return 1;
}
Neke slike/video za lakse dobivanje pomoci(neobavezno):
Jel moram brojati i ove }{ zagrade? neznam rješiti to
Morate biti prijavljeni da biste odgovorili na ovu temu.
Prijava