CMD problem? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: CMD problem? (
/showthread.php?tid=348234)
CMD problem? -
N0FeaR - 04.06.2012
Error
Код:
C:\Users\Hellman\Desktop\Rebound Roleplay server\pawno\include\/CRP/Commands/dropgun.pwn(8) : warning 217: loose indentation
C:\Users\Hellman\Desktop\Rebound Roleplay server\pawno\include\/CRP/Commands/dropgun.pwn(22) : error 035: argument type mismatch (argument 2)
C:\Users\Hellman\Desktop\Rebound Roleplay server\pawno\include\/CRP/Commands/dropgun.pwn(22) : error 035: argument type mismatch (argument 2)
C:\Users\Hellman\Desktop\Rebound Roleplay server\pawno\include\/CRP/Commands/dropgun.pwn(23) : error 035: argument type mismatch (argument 1)
C:\Users\Hellman\Desktop\Rebound Roleplay server\pawno\include\/CRP/Commands/dropgun.pwn(24) : error 035: argument type mismatch (argument 1)
C:\Users\Hellman\Desktop\Rebound Roleplay server\pawno\include\/CRP/Commands/dropgun.pwn(24) : error 035: argument type mismatch (argument 1)
C:\Users\Hellman\Desktop\Rebound Roleplay server\pawno\include\/CRP/Commands/dropgun.pwn(25) : error 017: undefined symbol "string"
C:\Users\Hellman\Desktop\Rebound Roleplay server\pawno\include\/CRP/Commands/dropgun.pwn(25) : error 017: undefined symbol "string"
C:\Users\Hellman\Desktop\Rebound Roleplay server\pawno\include\/CRP/Commands/dropgun.pwn(25) : error 029: invalid expression, assumed zero
C:\Users\Hellman\Desktop\Rebound Roleplay server\pawno\include\/CRP/Commands/dropgun.pwn(25) : fatal error 107: too many error messages on one line
CMD
pawn Код:
COMMAND:dropgun(playerid, params[])
{
if(PlayerInfo[playerid][pConnectTime] < 3)
{
return SendClientMessage(playerid, COLOR_GREY, " This command is restricted to: TLS 3 and above");
}
if (GetPlayerWeapon(playerid) < 2 || GetPlayerWeapon(playerid) > 34)
{
SendClientMessage(playerid, COLOR_GREY, " You cannot drop this weapon !");
return 1;
}
new Float:PlayersHealth;
GetPlayerHealth(playerid, PlayersHealth);
if (PlayersHealth == 0.0)
{
SendClientMessage(playerid, COLOR_GREY, " You have no access to drop this weapon at your health !");
return 1;
}
new sendername;
GetPlayerName(playerid, sendername, sizeof(sendername));
GiveNameSpace(sendername);
if(PlayerInfo[playerid][pMaskuse] == 1) { format(sendername, sizeof(sendername), "Stranger_%d", PlayerInfo[playerid][pRandMask]); }
format(string, sizeof(string), "* %s drops his weapon to the ground.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
new gunID = GetPlayerWeapon(playerid);
new gunAmmo = GetPlayerAmmo(playerid);
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid, X, Y, Z);
RemovePlayerWeaponEx(playerid, gunID);
SendClientMessage(playerid, COLOR_GREY, " You dropped your weapon onto the ground.");
DropWeapons(gunID,gunAmmo,X,Y,Z,GetPlayerVirtualWorld(playerid),playerid);
return 1;
}
COMMAND:dgun(playerid, params[])
{
return cmd_dropgun(playerid, params);
}
Re: CMD problem? -
Firo - 04.06.2012
lines please?
Re: CMD problem? -
N0FeaR - 04.06.2012
pawn Код:
COMMAND:dropgun(playerid, params[])
{
if(PlayerInfo[playerid][pConnectTime] < 3)
{
return SendClientMessage(playerid, COLOR_GREY, " This command is restricted to: TLS 3 and above");
}
if (GetPlayerWeapon(playerid) < 2 || GetPlayerWeapon(playerid) > 34)
{
SendClientMessage(playerid, COLOR_GREY, " You cannot drop this weapon !");
return 1;
}
new Float:PlayersHealth;
GetPlayerHealth(playerid, PlayersHealth);
if (PlayersHealth == 0.0)
{
SendClientMessage(playerid, COLOR_GREY, " You have no access to drop this weapon at your health !");
return 1;
}
new sendername;
line 22 GetPlayerName(playerid, sendername, sizeof(sendername));
line 23 GiveNameSpace(sendername);
line 24 if(PlayerInfo[playerid][pMaskuse] == 1) { format(sendername, sizeof(sendername), "Stranger_%d", line 25 PlayerInfo[playerid][pRandMask]); }
format(string, sizeof(string), "* %s drops his weapon to the ground.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
new gunID = GetPlayerWeapon(playerid);
new gunAmmo = GetPlayerAmmo(playerid);
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid, X, Y, Z);
RemovePlayerWeaponEx(playerid, gunID);
SendClientMessage(playerid, COLOR_GREY, " You dropped your weapon onto the ground.");
DropWeapons(gunID,gunAmmo,X,Y,Z,GetPlayerVirtualWorld(playerid),playerid);
return 1;
}
COMMAND:dgun(playerid, params[])
{
return cmd_dropgun(playerid, params);
}
Re: CMD problem? -
Firo - 04.06.2012
Post here your 'GetPlayerName' stock.