[POMOĆ] ZCMD to strcmp

Započeo sch
26. Sep. 2012. Zaključano
953
pregleda
3
postova
KumaR
5
Made Man
26. Sep. 2012.
Skripta koju koristim: My Edit mode
Detaljan opis problema: Želim da prebacim ovu komandu iz ZCMD u strcmp procesor komandi,pa ja sam odradio ali se nisam baš snašao,tako ako nije problem da mi pomognete,evo vam ZCMD ...
Dio skripte:

CMD:radargun(playerid, params[])
{
if(gTeam == 2 || IsACop(playerid) || PlayerInfo == 4 && PlayerInfo == 2 || PlayerInfo == 4 && PlayerInfo >= 5)
{
new string;
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessageEx(playerid, COLOR_GREY, "You can't do this while you're in a vehicle.");
return 1;
}

if(GetPVarInt(playerid, "IsInArena") >= 0)
{
SendClientMessageEx(playerid, COLOR_WHITE, "You can't do this right now, you are in a arena!");
return 1;
}
if(GetPVarInt( playerid, "EventToken") != 0)
{
SendClientMessageEx(playerid, COLOR_GREY, "You can't use the tazer while you're in an event.");
return 1;
}

if(GetPVarInt(playerid, "Injured") == 1)
{
SendClientMessageEx(playerid, COLOR_GREY, "You can't do this right now.");
return 1;
}

if(PlayerInfo > 0)
{
SendClientMessageEx(playerid, COLOR_WHITE, "You cannot use this in jail/prison.");
return 1;
}
if(PlayerCuffed >= 1) {
SendClientMessageEx(playerid, COLOR_WHITE, "You cannot use this while tazed/cuffed.");
return 1;
}

new SpeedRadar = GetPVarInt(playerid, "SpeedRadar");
if(SpeedRadar == 0)
{
SetPVarInt(playerid, "RadarReplacement", PlayerInfo);
if(PlayerInfo != 0) RemovePlayerWeapon(playerid, PlayerInfo);
format(string, sizeof(string), "* %s takes out a LIDAR speed gun.", GetPlayerNameEx(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GivePlayerValidWeapon(playerid, 43, 60000);
SetPVarInt(playerid, "SpeedRadar", 1);
}
else
{
RemovePlayerWeapon(playerid, 43);
GivePlayerValidWeapon(playerid, GetPVarInt(playerid, "RadarReplacement"), 60000);
format(string, sizeof(string), "* %s puts away their LIDAR speed gun.", GetPlayerNameEx(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
DeletePVar(playerid, "SpeedRadar");
}
}
else
{
SendClientMessageEx(playerid, COLOR_GREY, "  You are not a Cop / FBI / Coastguard!");
return 1;
}
return 1;
}

Neke slike/video za lakse dobivanje pomoci(neobavezno):
Deleted User
Obrisan korisnik
26. Sep. 2012.
Ovo ili on da bira?
if (strcmp(cmd, "/radargun", true) == 0)
{
if(gTeam == 2 || IsACop(playerid) || PlayerInfo == 4 && PlayerInfo == 2 || PlayerInfo == 4 && PlayerInfo >= 5)
{
new string;
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessageEx(playerid, COLOR_GREY, "You can't do this while you're in a vehicle.");
return 1;
}

if(GetPVarInt(playerid, "IsInArena") >= 0)
{
SendClientMessageEx(playerid, COLOR_WHITE, "You can't do this right now, you are in a arena!");
return 1;
}
if(GetPVarInt( playerid, "EventToken") != 0)
{
SendClientMessageEx(playerid, COLOR_GREY, "You can't use the tazer while you're in an event.");
return 1;
}

if(GetPVarInt(playerid, "Injured") == 1)
{
SendClientMessageEx(playerid, COLOR_GREY, "You can't do this right now.");
return 1;
}

if(PlayerInfo > 0)
{
SendClientMessageEx(playerid, COLOR_WHITE, "You cannot use this in jail/prison.");
return 1;
}
if(PlayerCuffed >= 1) {
SendClientMessageEx(playerid, COLOR_WHITE, "You cannot use this while tazed/cuffed.");
return 1;
}

new SpeedRadar = GetPVarInt(playerid, "SpeedRadar");
if(SpeedRadar == 0)
{
SetPVarInt(playerid, "RadarReplacement", PlayerInfo);
if(PlayerInfo != 0) RemovePlayerWeapon(playerid, PlayerInfo);
format(string, sizeof(string), "* %s takes out a LIDAR speed gun.", GetPlayerNameEx(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GivePlayerValidWeapon(playerid, 43, 60000);
SetPVarInt(playerid, "SpeedRadar", 1);
}
else
{
RemovePlayerWeapon(playerid, 43);
GivePlayerValidWeapon(playerid, GetPVarInt(playerid, "RadarReplacement"), 60000);
format(string, sizeof(string), "* %s puts away their LIDAR speed gun.", GetPlayerNameEx(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
DeletePVar(playerid, "SpeedRadar");
}
}
else
{
SendClientMessageEx(playerid, COLOR_GREY, "  You are not a Cop / FBI / server uklonjen!stguard!");
return 1;
}
return 1;
}
KumaR
5
Made Man
27. Sep. 2012.
Da može samo PD namjestiću,hvala! 🙂

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha