/Duel CMD
#1

Anyone have a Duel CMD for me? Cause i've only gettiing those errors:

Code:
C:\Documents and Settings\Lisa\Bureaublad\MGGFiz\gamemodes\MCRP.pwn(1384) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Lisa\Bureaublad\MGGFiz\gamemodes\MCRP.pwn(1384) : warning 215: expression has no effect
C:\Documents and Settings\Lisa\Bureaublad\MGGFiz\gamemodes\MCRP.pwn(1384) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Lisa\Bureaublad\MGGFiz\gamemodes\MCRP.pwn(1384) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Lisa\Bureaublad\MGGFiz\gamemodes\MCRP.pwn(1384) : fatal error 107: too many error messages on one line

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


4 Errors.
With this code:

Code:
stock IsPlayerLoggedIn(playerid)
{
	if(IsPlayerConnected(playerid))
	{
	    if(PlayerInfo[playerid][pLoggedIn]);
	    {
	        return 1;
	    }
	}
	return 0;
}
Specific line 1384:
Code:
	    if(PlayerInfo[playerid][pLoggedIn]);
my Duel code:
Code:
CMD:duel(playerid, params[])
{
	new playerb, string[128];
   	if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
	if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
	if(!aDuty[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You are not on Admin Duty.");
	if(sscanf(params, "u", playerb)) return SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /duel [playerid]");
    if(!IsPlayerLoggedIn(playerb)) return SendClientMessage(playerid, COLOR_GREY, "Invalid player id.");
	if(EventOn) return SendClientMessage(playerid, COLOR_GREY, "There's a event happening, you cant duel now.");
	if(DuelOn) return SendClientMessage(playerid, COLOR_GREY, "There is already an duel happening.");
	PlayerInfo[playerid][pInt] = GetPlayerInterior(playerid);
	PlayerInfo[playerid][pVW] = GetPlayerVirtualWorld(playerid);
	format(string, sizeof(string), "AdmWarn: %s has started an duel with %s.", RPN(playerid), RPN(playerb));
	SendAdminMessage(COLOR_LIGHTRED, 1, string);
	SendClientMessage(playerid, COLOR_BLUE, "You are duelling..");
	SendClientMessage(playerb, COLOR_BLUE, "You are duelling..");
	GetPlayerPos(playerid, eX, eY, eZ);
	GetPlayerHealth(playerid, eHP);
	GetPlayerArmour(playerid, eARMOR);
	for(new i=0; i<13; i++)
	{
		GetPlayerWeaponData(playerid, i, PlayerInfo[playerid][pWeapon][i], PlayerInfo[playerid][pWeaponAmmo][i]);
	}
	GunsBeingRemoved[playerid] = 1;
	DuelOn = 1;
	Duel[playerid] = 1;
	Duel[playerb] = 1;
	ResetPlayerWeapons(playerid);

	/* break */
	PlayerInfo[playerb][pInt] = GetPlayerInterior(playerb);
	PlayerInfo[playerb][pVW] = GetPlayerVirtualWorld(playerb);
	GetPlayerPos(playerb, eX, eY, eZ);
	GetPlayerHealth(playerb, eHP);
	GetPlayerArmour(playerb, eARMOR);
	for(new i=0; i<13; i++)
	{
		GetPlayerWeaponData(playerb, i, PlayerInfo[playerb][pWeapon][i], PlayerInfo[playerb][pWeaponAmmo][i]);
	}
	GunsBeingRemoved[playerb] = 1;
	ResetPlayerWeapons(playerb);
	SetTimerEx("EnterExitTimer", 5000, false, "i", playerid);
	GiveDodWeapon(playerid, 24, 200);
	GiveDodWeapon(playerb, 24, 200);
	TogglePlayerControllable(playerb, 0);
	TogglePlayerControllable(playerid, 0);
	SetPlayerHealth(playerid, 100);
	SetPlayerArmour(playerid, 100);
	SetPlayerHealth(playerb, 100);
	SetPlayerArmour(playerb, 100);
	SetTimerEx("EnterExitTimer", 5000, false, "i", playerb);
	SetPlayerPos(playerb, -257.6650,-862.7711,1188.3394);
	SetPlayerPos(playerid, -276.1044,-846.8372,1188.3394);
	SetPlayerVirtualWorld(playerid, 50);
	SetPlayerVirtualWorld(playerb, 50);
	SetPlayerInterior(playerb, 3);
	SetPlayerInterior(playerid, 3);
	return 1;
}
Reply
#2


pawn Code:
if(PlayerInfo[playerid][pLoggedIn])//removed ;
Reply
#3

Same Errors.
Reply
#4

Same errors? But on same lines? I don't think so.
Reply
#5

yes it is.it doesnt make sense.
Reply
#6

You're missing a value, e.g.

pawn Code:
if(PlayerInfo[playerid][pLoggedIn] == 1)
Reply
#7

Still the same,

I just moved that STOCK after Enum PInfo and i got those errors

So

All those STOCKS:
Code:
stock UpdateSANewsBroadcast()
{
    new string[42];
	if(broadcasting == 0)
	{
	    format(string, sizeof(string), "Currently: Not Broadcasting\nViewers: %d", viewers);
	}
	else
	{
	    format(string, sizeof(string), "Currently: LIVE\nViewers: %d", viewers);
	}
	UpdateDynamic3DTextLabelText(SANews3DText, COLOR_LIGHTBLUE, string);
}

RespawnNearbyVehicles(playerid, Float:radi)
{
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    for(new i=1; i<MAX_VEHICLES; i++)
    {
        if(GetVehicleModel(i))
        {
            new Float:posx, Float:posy, Float:posz;
            new Float:tempposx, Float:tempposy, Float:tempposz;
            GetVehiclePos(i, posx, posy, posz);
            tempposx = (posx - x);
            tempposy = (posy - y);
            tempposz = (posz - z);
            if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
            {
                SetVehicleToRespawn(i);
            }
        }
    }
}
stock IsPlayerLoggedIn(playerid)
{
	if(IsPlayerConnected(playerid))
	{
	    if(PlayerInfo[playerid][pLoggedIn])if(PlayerInfo[playerid][pLoggedIn] == 1)
	    {
	        return 1;
	    }
	}
	return 0;
}
stock RPN(playerid)
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    for(new i = 0; i < MAX_PLAYER_NAME; i++)
    {
        if(name[i] == '_') name[i] = ' ';
    }
    return name;
}
stock AntiAdv(playerid, text[])
{
    // Anti Adv
    new strR[255], is1=0, r=0;
 	while(strlen(text[is1]))
 	{
  		if('0'<=text[is1]<='9')
  		{
	 		new is2=is1+1, p=0;
	   		while(p==0)
		  	{
		   		if('0'<=text[is2]<='9'&&strlen(text[is2]))
			   	{
				   is2++;
				}
			 	else
			  	{
				   	strmid(strR[r],text,is1,is2,255);
				   	if(strval(strR[r])<255) r++;
				    is1=is2;
				    p=1;
		    	}
		    }
	    }
    	is1++;
 	}
 	if(r>=4)
 	{
	  	new strMy[255];
	  	format(strMy, sizeof(strMy), "AdmCmd: %s is attempting to Server Advertise: %s", GetPlayerNameEx(playerid), text);
	  	ABroadCast(COLOR_YELLOW, strMy, 2);
	   	new pr2;
	  	for(new z=0;z<r;z++)
	  	{

		   	while((pr2=strfind(text,strR[z],true))!=-1)
			{
				for(new i=pr2,j=pr2+strlen(strR[z]);i<j;i++)
				{
					text[i]='*';
				}
			}
	  	}
	  	return 1;
 	}
 	return 0;
}
stock SetPlayerHigh(playerid, toggle) // 0 = Not high, 1 = High
{
	SetPVarInt(playerid, "IsHigh", toggle);
	if(toggle)
	{
		SetPlayerWeather(playerid, -66);
		SetPlayerTime(playerid, 12, 0);
	}
	else
	{
	    SetPlayerWeather(playerid, gWeather);
		SetPlayerTime(playerid, gTime, 0);
	}
	return 1;
}
stock FindFreeAttachedObjectSlot(playerid)
{
	new index;
 	while (index < MAX_PLAYER_ATTACHED_OBJECTS && IsPlayerAttachedObjectSlotUsed(playerid, index))
	{
		index++;
	}
	if (index == MAX_PLAYER_ATTACHED_OBJECTS) return -1;
	return index;
}
By the other stocks (( this stocks were at the begin of the script, so before the enum pInfo enum ... etc. I moved them AFTER those enum's.


Then i got those errors:

Code:
C:\Documents and Settings\Lisa\Bureaublad\MGGFiz\gamemodes\MCRP.pwn(2081) : error 020: invalid symbol name ""
C:\Documents and Settings\Lisa\Bureaublad\MGGFiz\gamemodes\MCRP.pwn(2911) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Lisa\Bureaublad\MGGFiz\gamemodes\MCRP.pwn(2911) : warning 215: expression has no effect
C:\Documents and Settings\Lisa\Bureaublad\MGGFiz\gamemodes\MCRP.pwn(2911) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Lisa\Bureaublad\MGGFiz\gamemodes\MCRP.pwn(2911) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Lisa\Bureaublad\MGGFiz\gamemodes\MCRP.pwn(2911) : fatal error 107: too many error messages on one line

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


6 Errors.
hole code:
Code:
enum pInfo
{
	pLoggedIn,
	pSpawn,
	pZombie,
	pZInfected,
	pIP[16],
	pOwner,
	pLevel,
	pArmorUpgrade,
	pUpgradePoints,
	pMinutes,
	pTMinutes,
	pHours,
	pGender,
	pAge,
	pMoney,
	pBank,
	pModel,
	pAdmin,
	pMapper,
	pBanned,
	Float:pX,
	Float:pY,
	Float:pZ,
	pInt,
	pVW,
	pVehVW,
	pWalkStyle,
	pNeon,
	pVNeon,
	pTGun[2],
	pTGunAmmo[2],
	pvTGun[2],
	pvTGunAmmo[2],
	pFac,
	pFacRank,
	pFacLeader,
	pWeapon[13],
	pWeaponAmmo[13],
	pHospital,
	pFacDuty,
	pFacDiv,
	pFacDivLeader,
	pBiz,
	pVBiz,
	pHouse,
	pVHouse,
	pGarage,
	pVGarage,
	pJob,
	pJobSkill[MAX_JOBS],
	pJackSkill,
	pTPackages,
	pMPackages,
	pDPackages,
	pMaterials,
	pMMaterials,
	pMMPackages,
	pHMaterials,
	pHPackages,
	pWeed,
	pcocaine,
	pTWeed,
	pTcocaine,
	pvTWeed,
	pvTcocaine,
	pHasCellphone,
	pCellphone,
	pPhonebook,
	pDice,
	pCigar,
	pSpeedo,
	pSprunk,
	pSpray,
	pRope,
	pBlindfold,
	pWT,
	pWTC,
	pGas,
	pRadio,
	Float:pHealth,
	Float:pArmor,
	pInternet,
	pPrison,
	pPrisonTime,
	pPrisonReason[64],
	pPrisonBy[32],
	pWanted,
	pWanted1[64],
	pWanted2[64],
	pWanted3[64],
	pWanted4[64],
	pWanted5[64],
	pWanted6[64],
	pCrimes,
	pArrested,
	pContract,
	pContractBy[32],
	pTutorial,
	pWarns,
	pWarn1[64],
	pWarn2[64],
	pWarn3[64],
	pFlag[65],
	pNMute,
	pRMute,
	pADMute,
	pSpawnFreeze,
	pFam,
	pFamRank,
	pCSuccess,
	pCFail,
	pDeath,
	pKill,
	pHelper,
	pExp,
	pVeh,
	pBugged,
	pNumber,
	vModel,
	Float:vX,
	Float:vY,
	Float:vZ,
	Float:vA,
	vC1,
	vC2,
	vPJ,
	pVehMod[14],
	vLocked,
	pGangMod,
	pFacMod,
	pBanAppealer,
	pCarLic,
	pFlyLic,
	pJetpack,
	pWepLic,
	pAccent[16],
	pDay,
	pVIP,
	pVIPDay,
	pVIPMonth,
	pVIPHour,
	pVIPTemp,
	pVIPJob,
	pVVeh,
	vVModel,
	Float:vVX,
	Float:vVY,
	Float:vVZ,
	Float:vVA,
	vVC1,
	vVC2,
	vVPJ,
	pVVehMod[14],
	vVLocked,
	pVVVeh,
	vVVModel,
	Float:vVVX,
	Float:vVVY,
	Float:vVVZ,
	Float:vVVA,
	vVVC1,
	vVVC2,
	vVVPJ,
	pVVVehMod[14],
	vVVLocked,
	pVIPBuddy,
	pDeliverTruck,
	pNew,
	pRefPoints,
	pTester,
	pFightStyle,
	pScope,
	pCookies,
	pOldskool,
	pWRestricted,
	pFirstaid,
	pMats,
	pPot,
	pCrack,
	pPaintTokens,
	pDonateRank,
	pTempVIP,
	pBuddyInvited,
	pTokens,
	pWZ,
	pWValue,
	pMember,
	pHeadValue,
	pCHits,
	pC4Used,
	pC4,
	pPhousekey,
	pAccount,
	pNMuteTotal,
	pGiftTime,
	pWExists,
	pWObject,
	pWTimer,
	pWX,
	pWY,
	pWVW,
	pLeader,
	pADMuteTotal,
	pKills,
	pPaintTeam,
	pWInt,
	pDeaths,
	pGuns,
	pPnumber,
	pContractDetail,
	pRank
	pToyModel[10],
	Float:pToyX[10],
	Float:pToyY[10],
	Float:pToyZ[10],
	Float:pToyRX[10],
	Float:pToyRY[10],
	Float:pToyRZ[10],
 	Float:pToySX[10],
    Float:pToySY[10],
    Float:pToySZ[10],
    pReward,
    pFish[5],
    pLoyal,
    pLoyalTag,
    pLPoints,
    pStoned,
    pGate[3],
    pSafeAdmin
}
new PlayerInfo[MAX_PLAYERS][pInfo];
line 2081:
Code:
new PlayerInfo[MAX_PLAYERS][pInfo];
Hole code:
Enum pInfo As listed there ^^^^


line 2911:
Code:
	if(PlayerInfo[playerid][pAdmin] >= 2 || playerid == MAX_PLAYERS)
hole code:
Code:
stock GiftPlayer(playerid, giveplayerid) // playerid = Gifter.  giveplayerid = gift receiver
{
	new string[128];
	if(PlayerInfo[playerid][pAdmin] >= 2 || playerid == MAX_PLAYERS)
	{
		new randgift = Random(1, 100);
		if(randgift >= 1 && randgift <= 83)
		{
		    new gift = Random(1, 9);
		    if(gift == 1)
		    {
		        if(/*PlayerInfo[giveplayerid][pConnectTime] < 2 || */PlayerInfo[giveplayerid][pWRestricted] > 0) return GiftPlayer(playerid, giveplayerid);
		        GivePlayerValidWeapon(giveplayerid, 27, 60000);
		        GivePlayerValidWeapon(giveplayerid, 24, 60000);
		        GivePlayerValidWeapon(giveplayerid, 31, 60000);
		        GivePlayerValidWeapon(giveplayerid, 34, 60000);
		        GivePlayerValidWeapon(giveplayerid, 29, 60000);
		        SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won a full weapon set!");
		        format(string, sizeof(string), "* %s was just gifted a full weapon set, enjoy!", GetPlayerNameEx(giveplayerid));
				ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
		    }
		    else if(gift == 2)
		    {
		        PlayerInfo[giveplayerid][pFirstaid]++;
		        SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won a first aid kit!");
		        format(string, sizeof(string), "* %s was just gifted a first aid kit, enjoy!", GetPlayerNameEx(giveplayerid));
				ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
		    }
		    else if(gift == 3)
		    {
		        PlayerInfo[giveplayerid][pMats] += 2000;
		        SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won 2,000 materials!");
		        format(string, sizeof(string), "* %s was just gifted 2,000 materials, enjoy!", GetPlayerNameEx(giveplayerid));
				ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
		    }
		    else if(gift == 4)
		    {
		        if(PlayerInfo[giveplayerid][pWarns] != 0)
		        {
		        	PlayerInfo[giveplayerid][pWarns]--;
		        	SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won a single warning removal!");
		        	format(string, sizeof(string), "* %s was just gifted a single warning removal, enjoy!", GetPlayerNameEx(giveplayerid));
					ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
				}
				else
				{
        			SendClientMessageEx(playerid, COLOR_GRAD2, "Random gift ended up in a removal of one warning - let's try again!");
        			GiftPlayer(playerid, giveplayerid);
				    return 1;
				}
		    }
		    else if(gift == 5)
		    {
				PlayerInfo[giveplayerid][pPot] += 50;
				SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won 50 grams of pot!");
				format(string, sizeof(string), "* %s was just gifted 50 grams of pot, enjoy!", GetPlayerNameEx(giveplayerid));
				ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
		    }
		    else if(gift == 6)
		    {
		        PlayerInfo[giveplayerid][pCrack] += 25;
				SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won 25 grams of crack!");
				format(string, sizeof(string), "* %s was just gifted 25 grams of crack, enjoy!", GetPlayerNameEx(giveplayerid));
				ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
		    }
		    else if(gift == 7)
		    {
		        GivePlayerCash(giveplayerid, 20000);
				SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won $20,000!");
				format(string, sizeof(string), "* %s was just gifted $20,000, enjoy!", GetPlayerNameEx(giveplayerid));
				ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
		    }
			else if(gift == 8)
		    {
		        PlayerInfo[giveplayerid][pPaintTokens] += 10;
				SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won 10 paintball tokens!");
				format(string, sizeof(string), "* %s was just gifted 10 paintball tokens, enjoy!", GetPlayerNameEx(giveplayerid));
				ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
		    }
		}
		else if(randgift > 83 && randgift <= 98)
		{
		    new gift = Random(1, 6);
			if(gift == 1)
			{
			    GivePlayerCash(giveplayerid, 150000);
				SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won $150,000!");
				format(string, sizeof(string), "* %s was just gifted $150,000, enjoy!", GetPlayerNameEx(giveplayerid));
				ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
			}
			else if(gift == 2)
			{
			    PlayerInfo[giveplayerid][pMats] += 15000;
				SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won 15,000 materials!");
				format(string, sizeof(string), "* %s was just gifted 15,000 materials, enjoy!", GetPlayerNameEx(giveplayerid));
				ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
			}
			else if(gift == 3)
			{
			    PlayerInfo[giveplayerid][pExp] += 10;
				SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won 10 respect points!");
				format(string, sizeof(string), "* %s was just gifted 10 respect points, enjoy!", GetPlayerNameEx(giveplayerid));
				ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
			}
			else if(gift == 4)
			{
				SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won a free car!");
				SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Note: This rare reward may take up to 48 hours to be rewarded, contact Shop Techs.");
                format(PlayerInfo[giveplayerid][pFlag], 128, "Free Car (Gift)");
				format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s has just gifted %s and he won a free car.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
				ABroadCast(COLOR_YELLOW, string, 4);
				new year,month,day,log[128];
				getdate(year, month, day);
				format(log, sizeof(log), "AdmCmd: %s has just gifted %s and he won a free car(%d-%d-%d)", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), month, day, year);
				Log("logs/gifts.log", log);
				format(string, sizeof(string), "* %s was just gifted a free car, enjoy!", GetPlayerNameEx(giveplayerid));
				ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
			}
			else if(gift == 5)
			{
   				if(PlayerInfo[giveplayerid][pDonateRank] > 0)
			    {
		    		PlayerInfo[giveplayerid][pTokens] += 10;
					SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won 10 VIP tokens!");
					format(string, sizeof(string), "* %s was just gifted 10 VIP tokens, enjoy!", GetPlayerNameEx(giveplayerid));
					ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
			    }
			    else
			    {
			        PlayerInfo[giveplayerid][pDonateRank] = 1;
        			PlayerInfo[giveplayerid][pTempVIP] = 10800;
		    		PlayerInfo[giveplayerid][pBuddyInvited] = 1;
				    format(string, sizeof(string), "You have been invited to become a Level 1 VIP for 3 hours. Enjoy!", GetPlayerNameEx(giveplayerid));
				    SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, string);
				    format(string, sizeof(string), "BUDDY INVITE: %s has won a buddyinvite.", GetPlayerNameEx(giveplayerid));
				    Log("logs/makevip.log", string);
				    format(string, sizeof(string), "* %s was just gifted 3 hours of VIP, enjoy!", GetPlayerNameEx(giveplayerid));
					ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
			    }
			}
		}
		else if(randgift > 98 && randgift <= 100)
		{
		    new gift = Random(1, 5);
			if(gift == 1 && PlayerInfo[giveplayerid][pDonateRank] <= 2) // Silver VIP can get it extended, I suppose
			{
				SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won one month of Silver VIP!");
				SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Note: This rare reward may take up to 48 hours to be rewarded.");
				format(PlayerInfo[giveplayerid][pFlag], 128, "Free Silver VIP (Gift)");
				format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s has just gifted %s and he won one month of Silver VIP.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
				ABroadCast(COLOR_YELLOW, string, 2);
				new year,month,day,log[128];
				getdate(year, month, day);
				format(log, sizeof(log), "AdmCmd: %s has just gifted %s and he won one month of Silver VIP(%d-%d-%d)", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), month, day, year);
				Log("logs/gifts.log", log);
				format(string, sizeof(string), "* %s was just gifted one month of Silver VIP, enjoy!", GetPlayerNameEx(giveplayerid));
				ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
			}
			else if(gift == 2)
			{
				new year,month,day,log[128];
				getdate(year, month, day);
				format(log, sizeof(log), "AdmCmd: %s has just gifted %s and he won a free house(%d-%d-%d)", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), month, day, year);
				Log("logs/gifts.log", log);
				SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won a free house!");
				SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Note: This rare reward may take up to 48 hours to be rewarded.");
				format(PlayerInfo[giveplayerid][pFlag], 128, "Free House (Gift)");
				format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s has just gifted %s and he won a free house.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
				ABroadCast(COLOR_YELLOW, string, 2);
				format(string, sizeof(string), "* %s was just gifted a free house, enjoy!", GetPlayerNameEx(giveplayerid));
				ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
			}
			else if(gift == 3)
			{
				new year,month,day,log[128];
				getdate(year, month, day);
				format(log, sizeof(log), "AdmCmd: %s has just gifted %s and he won a $10 Gift Certificate on the Shop. (%d-%d-%d)", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), month, day, year);
				Log("logs/gifts.log", log);
				SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won a $10 Gift Certificate on the Shop!");
				SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Note: This rare reward may take up to 48 hours to be rewarded.");
				format(PlayerInfo[giveplayerid][pFlag], 128, "Free $10 Gift Certificate (Gift)");
				format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s has just gifted %s and he won a $10 Gift Certificate on the Shop.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
				ABroadCast(COLOR_YELLOW, string, 2);
				format(string, sizeof(string), "* %s was just gifted a $10 Gift Certificate on the Shop, enjoy!", GetPlayerNameEx(giveplayerid));
				ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
			}
			else if(gift == 4)
			{
				new year,month,day,log[128];
				getdate(year, month, day);
				format(log, sizeof(log), "AdmCmd: %s has just gifted %s and he won $500,000. (%d-%d-%d)", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid), month, day, year);
				Log("logs/gifts.log", log);
				GivePlayerCash(giveplayerid, 500000);
				SendClientMessageEx(giveplayerid, COLOR_GRAD2, " Congratulations - you have won $500,000!");
				format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s has just gifted %s and he won $500,000.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
				ABroadCast(COLOR_YELLOW, string, 2);
				format(string, sizeof(string), "* %s was just gifted $500,000, enjoy!", GetPlayerNameEx(giveplayerid));
				ProxDetector(30.0, giveplayerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
			}
		}
		PlayerInfo[giveplayerid][pGiftTime] = 300;
	}
	return 1;
}
Reply
#8

pawn Code:
pContractDetail,
    pRank,//comma!!!!!
    pToyModel[10],
...
if((PlayerInfo[playerid][pAdmin] >= 2) || (playerid == MAX_PLAYERS)) //updated
Reply
#9

Yes i saw it also, so that's 1 error. now we got 5 to go. I'm still trying to fix them.
Reply
#10

BUMP pleasse!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)