[Ayuda] Selector de Skines!
#1

Quisiera hacer esto en mi GM:
Reply
#2

https://sampwiki.blast.hk/wiki/AddPlayerClass
https://sampwiki.blast.hk/wiki/SetPlayerPos
https://sampwiki.blast.hk/wiki/SetPlayerCameraPos
https://sampwiki.blast.hk/wiki/SetPlayerCameraLookAt
https://sampwiki.blast.hk/wiki/SetPlayerInterior
https://sampwiki.blast.hk/wiki/SetPlayerVirtualWorld
https://sampwiki.blast.hk/wiki/OnPlayerRequestClass
https://sampforum.blast.hk/showthread.php?tid=487381

Код:
public OnGameModeInit(){

    AddPlayerClass(skin, Float:x, Float:y, Float:z, Float:Angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo); // class 1
    AddPlayerClass(skin, Float:x, Float:y, Float:z, Float:Angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo); // class 2
    AddPlayerClass(skin, Float:x, Float:y, Float:z, Float:Angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo); // class 3
    // etc ..
    
    return true;
}
Код:
public OnPlayerRequestClass(playerid,classid){

	SetPlayerPos(playerid, x, y, z);
	SetPlayerCameraPos(playerid, x, y, z);
	SetPlayerCameraLookAt(playerid, x, y, z);
	SetPlayerInterior(playerid, interiorid);
	SetPlayerVirtualWorld(playerid, worldid);

	switch(classid){
		case 0:{
			SendClientMessage(playerid, COLOR_RED, "seleccionaste el class 1");
			// tu funcion
		}
		case 1:{
			SendClientMessage(playerid, COLOR_RED, "seleccionaste el class 2");
			// tu funcion
		}
		case 2:{
			SendClientMessage(playerid, COLOR_RED, "seleccionaste el class 3");
			// tu funcion
		}
		// etc ...
	}

    return true;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)