force class selection
#1

i have this but when i choose team back again to class selection.
Код:
CMD:st(playerid,params[]){
    #pragma unused params
    new Float:x,Float:y,Float:z;
    if(PlayerInfo[playerid][pLogged]==false)return SendClientMessage(playerid,COLOR_RED,"You can not use this command.");
	if(PlayerInfo[playerid][pAdmin]<CmdsOptions[st])return SendClientMessage(playerid,COLOR_RED,"You can not use this command.");
	if(ServerInfo[st]==0)return CommandDisabled(playerid);
    GetPlayerPos(playerid,x,y,z);
	foreach(Player,i){
		if(IsPlayerInRangeOfPoint(i,25.0,x,y,z)){
		    if(gTeam[playerid]!=gTeam[i]){
		    	return SendClientMessage(playerid,COLOR_RED,"You can not use this command.");}}}
    ForceClassSelection(playerid);
    TogglePlayerSpectating(playerid,1);
    TogglePlayerSpectating(playerid,0);
	return 1;}
Reply
#2

use SetPlayerHealth(playerid, -1); and last forceclass?
Reply
#3

i want without dying and fast
Reply
#4

ForceClassSelection(playerid);
Delete this.
Reply
#5

Quote:
Originally Posted by Lumanov
Посмотреть сообщение
ForceClassSelection(playerid);
Delete this.
Then how to change team
Reply
#6

Quote:
Originally Posted by GeneralAref
Посмотреть сообщение
Then how to change team

Do you have arranged a system of choice team?
Reply
#7

Quote:
Originally Posted by GeneralAref
Посмотреть сообщение
Then how to change team
*Delete*
Reply
#8

Quote:
Originally Posted by GeneralAref
Посмотреть сообщение
i want without dying and fast
Edit: Sorry i didn't notice you already have TogglePlayerSpectating. Anyway i'd say set their health to 0.0

Cause that's the most usual and effective way every people do.
Reply
#9

People if you have no clue whatsoever as to what the OP is asking for OR if you have no clue whatsoever as to how to fix the issue, please refrain from posting. You are violating the forum rules. Thank you.

on topic: I don't know what the issue is with your original code as according to wiki SA-MP it should be working just perfect. However, you can achieve the system you want by simply using SetPlayerCameraPos, SetPlayerCameraLookAt and various SetPlayerSkin functions and you can simply use a GetPlayerSkin and assign the player to a team afterwards the skin selection. It takes effort and time but it gets the job done. Don't forget to save the player's old positions to teleport the player back to where he/she was before.

Edit: Stop telling him to use SetPlayerHealth function. He already said that he doesn't want to use the SetPlayerHealth function. Jesus christ. And no it isn't the most "useful and effective way" to do it and no, only beginner scripters do it.
Reply
#10

i use text draw for team but after type /st and select team back to class selection and any problem in my text draws.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)