GiveFullSetWeapon CMD help me please
#1

Code of the CMD I made :
Код:
CMD:givefullset(playerid, params[])
{
	if(PlayerInfo[playerid][pAdmin] >= 4)
	{
			if(IsPlayerInAnyVehicle(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot get this full set weapon now.");
		    if(PlayerInfo[playerid][pWRestricted] > 0) return SendClientMessageEx(playerid, COLOR_GRAD2, "You cannot get this as you are currently restricted from possessing weapons!");
		    {

      if(GetPlayerCash(playerid) >= 0) {
      GivePlayerValidWeapon(playerid, 27, 99999);
      GivePlayerCash(playerid, 0);
      SendClientMessageEx(playerid, COLOR_LIGHTBLUE,"   You Get Spas-12");
       return 1;
                }
                
                    if(GetPlayerCash(playerid) >= 0) {
                    GivePlayerValidWeapon(playerid, 34, 99999);
                    GivePlayerCash(playerid, 0);
                    SendClientMessageEx(playerid, COLOR_LIGHTBLUE,"   You get a sniper rifle!");
                    return 1;
                }
                                if(GetPlayerCash(playerid) >= 0) {
                    GivePlayerValidWeapon(playerid, 24, 60000);
                    GivePlayerCash(playerid, 0);
                    SendClientMessageEx(playerid, COLOR_LIGHTBLUE,"   You have get Desert Eagle!");
                    return 1;
                }
                               if(GetPlayerCash(playerid) >= 0) {
                    GivePlayerValidWeapon(playerid, 31, 99999);
                    GivePlayerCash(playerid, 0);
                    SendClientMessageEx(playerid, COLOR_LIGHTBLUE,"   You get an M4!");
                    return 1;
                }
                                if(GetPlayerCash(playerid) >= 0) {
                    SetPlayerArmour(playerid, 100);
                    GivePlayerCash(playerid, 0);
                    SendClientMessageEx(playerid, COLOR_LIGHTBLUE,"   You get a kevlar vest!");
                    return 1;
                }



Error's of that CMD :
Код:
d:\Users\User\Desktop\Np\GodFather Roleplay\gamemodes\GF2.pwn(3169) : error 017: undefined symbol "ProxDetector"
d:\Users\User\Desktop\Np\GodFather Roleplay\gamemodes\GF2.pwn(3177) : error 017: undefined symbol "ProxDetector"
d:\Users\User\Desktop\Np\GodFather Roleplay\gamemodes\GF2.pwn(3184) : error 017: undefined symbol "ProxDetector"
d:\Users\User\Desktop\Np\GodFather Roleplay\gamemodes\GF2.pwn(3193) : error 017: undefined symbol "ProxDetector"
d:\Users\User\Desktop\Np\GodFather Roleplay\gamemodes\GF2.pwn(3207) : error 017: undefined symbol "ProxDetector"
d:\Users\User\Desktop\Np\GodFather Roleplay\gamemodes\GF2.pwn(3214) : error 017: undefined symbol "ProxDetector"
d:\Users\User\Desktop\Np\GodFather Roleplay\gamemodes\GF2.pwn(3218) : error 017: undefined symbol "GivePlayerCash"
d:\Users\User\Desktop\Np\GodFather Roleplay\gamemodes\GF2.pwn(3221) : error 017: undefined symbol "ProxDetector"
d:\Users\User\Desktop\Np\GodFather Roleplay\gamemodes\GF2.pwn(3228) : error 017: undefined symbol "ProxDetector"
d:\Users\User\Desktop\Np\GodFather Roleplay\gamemodes\GF2.pwn(3236) : error 017: undefined symbol "ProxDetector"
d:\Users\User\Desktop\Np\GodFather Roleplay\gamemodes\GF2.pwn(3243) : error 017: undefined symbol "ProxDetector"
d:\Users\User\Desktop\Np\GodFather Roleplay\gamemodes\GF2.pwn(3250) : error 017: undefined symbol "ProxDetector"
d:\Users\User\Desktop\Np\GodFather Roleplay\gamemodes\GF2.pwn(3258) : error 017: undefined symbol "GivePlayerCash"
d:\Users\User\Desktop\Np\GodFather Roleplay\gamemodes\GF2.pwn(3261) : error 017: undefined symbol "ProxDetector"
d:\Users\User\Desktop\Np\GodFather Roleplay\gamemodes\GF2.pwn(3268) : error 017: undefined symbol "ProxDetector"
d:\Users\User\Desktop\Np\GodFather Roleplay\gamemodes\GF2.pwn(3275) : error 017: undefined symbol "ProxDetector"
d:\Users\User\Desktop\Np\GodFather Roleplay\gamemodes\GF2.pwn(3297) : error 017: undefined symbol "ProxDetector"
d:\Users\User\Desktop\Np\GodFather Roleplay\gamemodes\GF2.pwn(3306) : error 017: undefined symbol "ProxDetector"
d:\Users\User\Desktop\Np\GodFather Roleplay\gamemodes\GF2.pwn(3318) : error 017: undefined symbol "ProxDetector"
d:\Users\User\Desktop\Np\GodFather Roleplay\gamemodes\GF2.pwn(3333) : error 017: undefined symbol "ProxDetector"
d:\Users\User\Desktop\Np\GodFather Roleplay\gamemodes\GF2.pwn(3341) : error 017: undefined symbol "ProxDetector"
d:\Users\User\Desktop\Np\GodFather Roleplay\gamemodes\GF2.pwn(3349) : error 017: undefined symbol "ProxDetector"
d:\Users\User\Desktop\Np\GodFather Roleplay\gamemodes\GF2.pwn(3367) : error 017: undefined symbol "ProxDetector"
d:\Users\User\Desktop\Np\GodFather Roleplay\gamemodes\GF2.pwn(3389) : error 017: undefined symbol "ProxDetector"
d:\Users\User\Desktop\Np\GodFather Roleplay\gamemodes\GF2.pwn(3397) : error 017: undefined symbol "ProxDetector"
d:\Users\User\Desktop\Np\GodFather Roleplay\gamemodes\GF2.pwn(3405) : error 017: undefined symbol "GivePlayerCash"

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


26 Errors.

Somone can add in reply the right code please ?
Reply
#2

pawn Код:
// At the bottom
stock ProxDetector(Float:radi, playerid, string[],color)
{
    new Float:x,Float:y,Float:z;
    GetPlayerPos(playerid,x,y,z);
    for(new player;player<MAX_PLAYERS;player++)
    {
        if(!IsPlayerConnected(playerid))continue;
        if(IsPlayerInRangeOfPoint(playerid,radi,x,y,z))SendClientMessage(player,color,string);
    }
}
// AND
stock GivePlayerCash( playerid, money )
{
    return SetPlayerMoney( playerid, GetPlayerMoney( playerid ) + money );
}
Reply
#3

Quote:
Originally Posted by Dwane
Посмотреть сообщение
pawn Код:
// At the bottom
stock ProxDetector(Float:radi, playerid, string[],color)
{
    new Float:x,Float:y,Float:z;
    GetPlayerPos(playerid,x,y,z);
    for(new player;player<MAX_PLAYERS;player++)
    {
        if(!IsPlayerConnected(playerid))continue;
        if(IsPlayerInRangeOfPoint(playerid,radi,x,y,z))SendClientMessage(player,color,string);
    }
}
// AND
stock GivePlayerCash( playerid, money )
{
    return SetPlayerMoney( playerid, GetPlayerMoney( playerid ) + money );
}
CAN YOU add all the CMD fixed please ?
Reply
#4

No, I cannot. I gave you these functions in case you don't have them. However, it might be missing a brace "}" to your cmd, because you've opened 2 brackets more.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)