Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ocmd:invite(playerid, params[])
- {
- if(IsPlayerInFraktion(playerid,0)) return SendClientMessage(playerid,COLOR_ERRORTEXT,"Du bist in keiner Frakton");
- if(sInfo[playerid][rang]<=11) return SendClientMessage(playerid,COLOR_ERRORTEXT,"Du bist nicht mindestens Rang 11");
- new pID,fID;
- fID=sInfo[playerid][fraktion];
- if(sscanf(params,"u",pID)) return SendClientMessage(playerid,COLOR_BENUTZETEXT,"Benutze: /invite [id]");
- if(!IsPlayerInFraktion(playerid,0))return SendClientMessage(playerid,COLOR_ERRORTEXT,"Dieser Spieler ist bereits in einer Organisation");
- new string[256];
- format(string,sizeof(string),"%s hat dich in seine Fraktion %s eingeladen. Benutze /accept invite um der Fraktion beizutreten",getPlayerName(playerid),fInfo[fID][f_name]);
- SendClientMessage(pID,COLOR_LIGHTBLUE,string);
- SetPVarInt(pID,"inv_fraktid",fID);
- SetPVarInt(pID,"inv_inviter",playerid);
- return 1;
- }
- ocmd:/accept(playerid,params[])
- {
- new service[64]
- if(sscanf(params,"s[64]",service))return SendClientMessage(playerid,COLOR_ERRORTEXT,"Benutze: /accept [invite]");
- if(!strcmp(service,"invite",true))
- {
- if(GetPVarInt(playerid,"inv_fraktid") == 0) return SendClientMessage(playerid,COLOR_ERRORTEXT,"Niemand hat dir einen Invite angeboten");
- new fID, string[];
- fID = GetPVarInt(playerid, "inv_faktid");
- sInfo[playerid][fraktion] = fID;
- sInfo[playerid][rang] = 1;
- format(string,sizeof(string),"Du bist der Fraktion %s beigetreten. Viel Spaß beim Spielen",fInfo[fID][f_name]);
- SendClientMessage(playerid,COLOR_ORANGE,string);
- format(string,sizeof(string),"%s ist deiner Fraktion beigetreten.",GetPlayerName(playername));
- SendClientMessage(GetPVarInt(playerid,"inv_inviter"),COLOR_LIGHTBLUE,string);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement