player teleporting while not permision help for +rep
#1

Hello Guys i have create some variables one spawned onplayerspawn i make him 1 and onplayerdeath connect and disconnect its 0 but when playerdeath if he type any teleport common its work players death body teleport to location
and its not giving also reason which i have given like this

PHP код:
CMD:d(playerid,params[])
{
    
CheckTele(playerid);
    if(
pInfo[playerid][pTeleport] == 0) return SendClientMessage(playerid,COLOR_RED,WAIT);
    if(
pInfo[playerid][pSpawned] == 1)
    {
        new 
str[128],str1[128];
        
SetPlayerPosEx(playerid,4.9865,1463.4211,15.1705,359.6436,0,0);
        
SetCameraBehindPlayer(playerid);
        
format(str,sizeof(str),"{84F6D7}%s: {FFA1AF}You Have Been Teleport To DryLake.",PlayerName(playerid));
        
SendClientMessage(playerid,COLOR_RED,str);
        
format(str1,sizeof(str1),"%s: {FFA1AF}Has Been Teleport To DryLake. Type /d To Teleport there",PlayerName(playerid));
        
SendClientMessageToAll(COLOR_LBLUE,str1);
        
pInfo[playerid][pTeleport] = 0;
    }
    else
    
SendClientMessage(playerid,COLOR_RED,Death_msg);
    return 
1;

Help me for +rep
Reply
#2

Lack of info , also you didn't even tell us what you set and when you set it.

also
PHP код:
    else // you dont need this here 
    
SendClientMessage(playerid,COLOR_RED,Death_msg); 
Reply
#3

This is the solution, easy:
PHP код:
if(GetPlayerState(playerid) == PLAYER_STATE_WASTED)
{
SendClientMessage(playerid,COLOR_RED,"CAN TP WHILE UR DED");
return 
0;

Reply
#4

Ty Guys Sorry for inactivity a fall in sleep last night
Reply
#5

rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)