Detaljan opis problema:Zelim da napravim OPSP tazer onaj, ali svaki put kada sve lijepo complieam, prodje odlicno sve, udjem u igru, kucam /tazer ono ne radi. Isto kao da nisam ni kucao.
Dio skripte:
if(strcmp(cmd, "/tazer", true) ==0 || strcmp(cmd, "/ta", true) ==0)
{
// We make it again for TEAM_COPS
if(gTeam == 2) // For cops
{
if(IsPlayerInAnyVehicle(playerid)) // Checks if the player is in a vehicle.
{
SendClientMessage(playerid, 0xFF0000FF, "You can't use this command while in a car!");
return 1;
}
if(pTazer == 0) // If the player has no tazer withdrawn.
{
GivePlayerWeapon(playerid, 23, 20); // Gives a SD.
pTazer = 1; // Sets the var to true.
return 1;
}
else if(pTazer == 1) // If the player has the tazer withdrawn to holster it.
{
GivePlayerWeapon(playerid, 24, 100); // Gives a deagle.
pTazer = 0; // Sets the var to false.
return 1;
}
}// Not a cop.
return 1;
}Neke slike/video za lakse dobivanje pomoci(neobavezno):
Sve sam lijepo dodao, i varijable, i OPSP callback u skripti, ali ne radi..