SA-MP Forums Archive
Doing something wrong... (gTeam pls help me out) (SAVING SYSTEM) - 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: Doing something wrong... (gTeam pls help me out) (SAVING SYSTEM) (/showthread.php?tid=387034)



Doing something wrong... (gTeam pls help me out) (SAVING SYSTEM) - Scrillex - 23.10.2012

PHP код:
if(classid == 0)
    {
        
gTeam[playerid] = Crips;
        
GameTextForPlayer(playerid,"~b~Sweet Leader of Ganton Crips",3000,5); // This will show up an Text , when you select your class
        
SetPlayerPos(playerid,2522.6702,-1679.2592,15.4970); // position of the player in the class selection
        
SetPlayerColor(playerid0xABCDEF01);
        
gTeam[playerid] = INI_WriteString(file,"Leader",pInfo[playerid][Leader]);
        
SetPlayerInterior(playerid0);
        
ApplyAnimation(playerid,"BEACH""ParkSit_M_loop"4.010100);
        
SetPlayerFacingAngleplayerid90);
        
InterpolateCameraPos(playerid2515.281005, -1667.02465815.9312152519.318359, -1679.08789014.9378715000);
        
InterpolateCameraLookAt(playerid2520.151123, -1668.14086916.1186712524.208007, -1679.38769515.9388733000);
        
    } 
Just want to if play chose this skin he is leader... But how it's possible to set, if I have like 23 more gangs to save by Crips,Bloodz,Vagos etc..


Thank you for your time..

Respectfully Scrillex!


Re: Doing something wrong... (gTeam pls help me out) (SAVING SYSTEM) - Abhishek. - 23.10.2012

well add this
switch(classid)//so it can see each class
{
case 0
{
gTeam[playerid] = Crips;
GameTextForPlayer(playerid,"~b~Sweet Leader of Ganton Crips",3000,5); // This will show up an Text , when you select your class
SetPlayerPos(playerid,2522.6702,-1679.2592,15.4970); // position of the player in the class selection
SetPlayerColor(playerid, 0xABCDEF01);
gTeam[playerid] = INI_WriteString(file,"Leader",pInfo[playerid][Leader]);
SetPlayerInterior(playerid, 0);
ApplyAnimation(playerid,"BEACH", "ParkSit_M_loop", 4.0, 1, 0, 1, 0, 0);
SetPlayerFacingAngle( playerid, 90);
InterpolateCameraPos(playerid, 2515.281005, -1667.024658, 15.931215, 2519.318359, -1679.087890, 14.937871, 5000);
InterpolateCameraLookAt(playerid, 2520.151123, -1668.140869, 16.118671, 2524.208007, -1679.387695, 15.938873, 3000);
}
case 1
{
//for your second class add everything of crips here except makeing him leader
}
}
}