How to add /invite and /uninvite
#1

Hello friends.I want to ask you about this house system :

http://forum.sa-mp.com/showthread.ph...t=House+System

How can i add /invite and /uninvite to this system?

i just know this :

Код:
new invited;
Reply
#2

how you mean? invite a player to get into your house or something?
Reply
#3

I want to make something like this :

Код:
new invited[MAX_PLAYERS][MAX_PICKUPS];
public OnPlayerConnect:
Код:
for(new a=15;a<155;a++){ kviestas[playerid][a]=false;}
cmd:
Код:
	else if (strcmp(text, "invite", true,6)==0){
		if(text[6] == 0) {	SendClientMessage(playerid, TEXTCOL_GREY, "Invite player to your house: invite [name]");	return 0;}
		new id = GetPlayeridMid(text[7]);
		if(id == INVALID_PLAYER_ID) {SendClientMessage(playerid, TEXTCOL_GREY, "Player not exist");	return 0;}
		invited[id][GetPlayerVirtualWorld(playerid)]=true;
		new zin[256],name[MAX_PLAYER_NAME];
		GetPlayerName(playerid,name,MAX_PLAYER_NAME);
		format(zin,sizeof(zin),"%s invited you to house",name);
		SendClientMessage(id,TEXTCOL_BLUE,zin);
		GetPlayerName(id,name,MAX_PLAYER_NAME);
		format(zin,sizeof(zin),"You invited %s if you want to cancel : noinvite %s",name,name);
		SendClientMessage(playerid,TEXTCOL_BLUE,zin);
		return 0;}
cmd:
Код:
	else if (strcmp(text, "noinvite", true,8)==0){
		if(text[8] == 0) {	SendClientMessage(playerid, TEXTCOL_GREY, "Cancel invitation: noinvite [name]");	return 0;}
		new id = GetPlayeridMid(text[9]);
		if(id == INVALID_PLAYER_ID) {SendClientMessage(playerid, TEXTCOL_GREY, "Player not exist");	return 0;}
		invited[id][GetPlayerVirtualWorld(playerid)]=false;
		new zin[256],name[MAX_PLAYER_NAME];
		GetPlayerName(playerid,name,MAX_PLAYER_NAME);
		format(zin,sizeof(zin),"%s canceled the invitation",name);
		SendClientMessage(id,TEXTCOL_BLUE,zin);
		GetPlayerName(id,name,MAX_PLAYER_NAME);
		format(zin,sizeof(zin),"You canceled invitation for  %s",name);
		SendClientMessage(playerid,TEXTCOL_BLUE,zin);
		return 0;}
public onPlayerPickUpPickup:
Код:
}else if(invited[playerid][pickupid]){
	new Float:x, Float:y,Float:z;
	GetPlayerPos(playerid,x,y,z);
	namopos[playerid][0]=floatround(x);
	namopos[playerid][1]=floatround(y);
	namopos[playerid][2]=floatround(z);
	SetPlayerPos(playerid,Namupos[NamoInfo[pickupid]][0],Namupos[NamoInfo[pickupid]][1],Namupos[NamoInfo[pickupid]][2]);
	SetPlayerInterior(playerid,NamuInt[NamoInfo[pickupid]]);
	SetPlayerVirtualWorld(playerid,pickupid);
But i want to make it without pickups.
Reply
#4

bump i want make cmd wich invites friend in my house in that house system the killer
Reply
#5

bump
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)