Command Problem[ss]
#10

Here is that
im using an old gm

Quote:

stock Invite(giveplayerid,team)
{
new teampos = GetTeam(team), who = GetPVarInt(giveplayerid, "InvitedBy");
if(who != -1)
{
format(iStr, sizeof(iStr), "# [%s] %s has been invited to the faction by %s", teams[teampos][teamname], RPName(giveplayerid), RPName(who));
SendClientMessageToTeam(team, iStr, COLOR_PLAYER_VLIGHTBLUE);
SetPVarInt(giveplayerid, "InvitedBy", -1);
}
else
{
format(iStr, sizeof(iStr), "# [%s] %s has been invited to the faction", teams[teampos][teamname], RPName(giveplayerid));
SendClientMessageToTeam(team, iStr, COLOR_PLAYER_VLIGHTBLUE);
}
format(iStr, sizeof(iStr),"10[INVITE] %s has been invited to %s.", PlayerName(giveplayerid),teams[teampos][teamname]);
iEcho(iStr);
PlayerInfo[giveplayerid][fpay] = 0;
PlayerTemp[giveplayerid][spawnrdy]=0;
PlayerInfo[giveplayerid][playerteam]=team;
myStrcpy(PlayerInfo[giveplayerid][PTeamName],teams[teampos][teamname]);
SetPlayerTeamEx(giveplayerid,team);
SetPlayerTeam(giveplayerid,team);
PlayerInfo[giveplayerid][ranklvl] = 3; // LOWEST !!!!!!
format(iStr, sizeof(iStr), "Team-%s.txt", PlayerInfo[giveplayerid][PTeamName]);
myStrcpy(PlayerInfo[giveplayerid][rankname], dini_Get(iStr, "startrank"));
PlayerInfo[giveplayerid][fpay] = dini_Int(iStr, "startpayment");
SetPVarInt(giveplayerid, "InvitedToFaction",0);
return 1;
}

and here its accept command Ignore ticket

Quote:

COMMAND:accept(playerid, params[])
{
if(!strlen(params)) return SCP(playerid, "ticket/faction/team");
if(!strcmp(params, "ticket", true))
{
if(!ticket[playerid]) return SendClientError(playerid, "You didn't receive any ticket!");
GivePlayerMoneyEx(playerid,-ticket[playerid]);
format(iStr,sizeof(iStr),"** [PD CENTRAL] %s has paid the ticket of $%d.",PlayerName(playerid),ticket[playerid]);
SendClientMessageToTeam(COPS,iStr,COLOR_PINK);
SendClientMessageToTeam(FBI,iStr,COLOR_PINK);
SendClientMessageToTeam(SASF,iStr,COLOR_PINK);
SendClientMessageToTeam(EMS,iStr,COLOR_PINK);
dini_IntSet(globalstats,"PoliceBank",dini_Int(glob alstats,"PoliceBank")+ticket[playerid]);
ticket[playerid]=0;
return 1;
}
if(!strcmp(params, "faction", true))
{
if(GetPVarInt(playerid, "InvitedToFaction"))
{
Invite(playerid, GetPVarInt(playerid, "InvitedToFaction"));
SetPVarInt(playerid, "InvitedToFaction", 0);
}
return 1;
}
if(!strcmp(params, "team", true))
{
new path[256];
format(path,sizeof(path),"teams/Team-%s.txt",PlayerInfo[playerid][playerteaminvite]);
if(dini_Exists(path))
{
if(PlayerInfo[playerid][playerteam]==CIV)
{
new iPlayer;
SendClientInfoEx(playerid,"You have joined %s.",PlayerInfo[playerid][playerteaminvite]);
PlayerInfo[playerid][teamtier]=2;
myStrcpy(PlayerInfo[playerid][playerteamname],PlayerInfo[playerid][playerteaminvite]);
dUserSet(PlayerName(playerid)).("playerteamname",P layerInfo[playerid][playerteaminvite]);
myStrcpy(PlayerInfo[playerid][playerteaminvite],"None");
PlayerInfo[iPlayer][playerteamname] = PlayerInfo[playerid][playerteamname];
}
}

Reply


Messages In This Thread
Command Problem[ss] - by Diti1 - 11.11.2014, 17:20
Re: Command Problem[ss] - by Diti1 - 11.11.2014, 19:34
Re: Command Problem[ss] - by DavidBilla - 11.11.2014, 20:13
Re: Command Problem[ss] - by Diti1 - 11.11.2014, 21:08
Re: Command Problem[ss] - by DavidBilla - 12.11.2014, 00:25
Re: Command Problem[ss] - by Diti1 - 12.11.2014, 11:59
Re: Command Problem[ss] - by DavidBilla - 12.11.2014, 14:21
Re: Command Problem[ss] - by Diti1 - 12.11.2014, 17:46
Re: Command Problem[ss] - by BornHuman - 12.11.2014, 20:01
Re: Command Problem[ss] - by Diti1 - 12.11.2014, 20:27

Forum Jump:


Users browsing this thread: 1 Guest(s)