Gang System Help - 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: Gang System Help (
/showthread.php?tid=337258)
Gang System Help -
Santox14 - 25.04.2012
Hey samp forum, i want to make a system for my gang's like if the player is an official member of "Grove" he can drive grove street car's if not he can't and i need an /makeleader cmd and an /invite and /gkick to kick the member out of the gang..
I define my gangs like this:
pawn Код:
public SetPlayerTeamFromClass(playerid, classid)
{
switch(classid)
{
case 0:
{
gTeam[playerid] = Grove;
SetPlayerPos(playerid,2520.2805,-1661.7422,14.4388);
SetPlayerCameraPos(playerid, 2518.0984,-1662.1184,14.2107);
SetPlayerCameraLookAt(playerid,2520.2805,-1661.7422,14.4388);
SetPlayerFacingAngle(playerid,94.8389);
GameTextForPlayer(playerid, "~y~Grove Street Families", 3000, 5);
}
case 1..2:
{
gTeam[playerid] = Seville;
SetPlayerPos(playerid,2765.3560,-2012.0973,13.5620);
SetPlayerCameraPos(playerid,2768.0066,-2012.0149,13.5547);
SetPlayerCameraLookAt(playerid,2765.3560,-2012.0973,13.5620);
SetPlayerFacingAngle(playerid,269.3739);
GameTextForPlayer(playerid, "~y~Seville Boulevard Families", 3000, 5);
}
Is it possible to make it with an enum? or something? I'm new to scripting and dont know much about that.. Can you help me ?
Re: Gang System Help -
404 Not Found - 25.04.2012
Example of /invite and /gkick
pawn Код:
COMMAND:invite(playerid,params[])
{
new id,team;
if(sscanf(params,"ii",id,team)) return 1;
{
if(IsPlayerConnected(id)) return 1;
{
switch(team)
{
case 0: gTeam[id] = Grove;
case 1: gTeam[id] = Seville;
}
}
}
return 1;
}
COMMAND:gkick(playerid,params[])
{
new id;
if(sscanf(params,"i",id)) return 1;
{
if(IsPlayerConnected(id)) return 1;
{
gTeam[id] = Default;
}
}
return 1;
}
AW: Gang System Help -
Santox14 - 25.04.2012
Thanks, but i thougt about something like that:
I do /makeleader and the player's gang id changed for example to 1 = Grove, 0 = Normal player and then he is able to drive the gang cars and /invite and /gkick player's but only the leader can do /invite and /gkick Someone can help me with that?
Re: Gang System Help -
404 Not Found - 25.04.2012
Create an enum with variable gLeader //Gang Leader - And Save it on PlayerFile and use if(gTeam[playerid] == gLeader).
AW: Gang System Help -
Santox14 - 26.04.2012
Can you give me an example?
AW: Gang System Help -
Santox14 - 26.04.2012
Can someone help me with that?