07.05.2012, 11:43
I want to make something like this :
public OnPlayerConnect:
cmd:
cmd:
public onPlayerPickUpPickup:
But i want to make it without pickups.
Код:
new invited[MAX_PLAYERS][MAX_PICKUPS];
Код:
for(new a=15;a<155;a++){ kviestas[playerid][a]=false;}
Код:
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;}
Код:
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;}
Код:
}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);