/get command
#1

Help with /get command

Код:
if(!strcmp(cmdtext, "/get", true,4))
		{
    		if(cmdtext[4]==0){SendClientMessage(playerid, 0xD9E916FF, "/get [player name (id)]"); return 1;}
    		new vardas[MAX_PLAYER_NAME];
 			strmid(vardas,cmdtext[5],0,MAX_PLAYER_NAME);
 			new id = GetPlayeridMid(vardas);
 			if (id == INVALID_PLAYER_ID){ SendClientMessage(playerid, 0xD9E916FF, "The player does not.."); return 1;}
 			if (GetPlayerVirtualWorld(playerid)>0){SendClientMessage(playerid, 0xD9E916FF, "You are at home, call the player in the house ..."); return 1;}
 			if (playerDB[id][ikalintas]) {SendClientMessage(playerid, 0xD9E916FF, "Player in jail"); return 1;}
            if(IsPlayerNPC(id)){ SendClientMessage(playerid, RED, "* Botu Atkelti Negalima!"); return 1;}
			SetPlayerInterior(id,GetPlayerInterior(playerid));
			new Float:tempcoo[3];
 			GetPlayerPos(playerid,tempcoo[0],tempcoo[1],tempcoo[2]);
 			SetPlayerPos(id,tempcoo[0],tempcoo[1],tempcoo[2]);
 			SetCameraBehindPlayer(id);
    		return 1;
		}
How to build a team with the approval of?
Sorry for my handwriting
I am not an Englishman
Reply
#2

plz help :/
pawn Код:
if(!strcmp(cmdtext, "/get", true,4))
        {
            if(cmdtext[4]==0){SendClientMessage(playerid, 0xD9E916FF, "/get [player name (id)]"); return 1;}
            new vardas[MAX_PLAYER_NAME];
            strmid(vardas,cmdtext[5],0,MAX_PLAYER_NAME);
            new id = GetPlayeridMid(vardas);
            if (id == INVALID_PLAYER_ID){ SendClientMessage(playerid, 0xD9E916FF, "The player does not.."); return 1;}
            if (GetPlayerVirtualWorld(playerid)>0){SendClientMessage(playerid, 0xD9E916FF, "You are at home, call the player in the house ..."); return 1;}
            if (playerDB[id][ikalintas]) {SendClientMessage(playerid, 0xD9E916FF, "Player in jail"); return 1;}
            if(IsPlayerNPC(id)){ SendClientMessage(playerid, RED, "* Botu Atkelti Negalima!"); return 1;}
GetPlayerName(playerid,vardas,MAX_PLAYER_NAME);        
new msg[128]; format(msg, sizeof(msg), "{00FF00}Player {FF0000}%s {00FF00}can get?",vardas);
ShowPlayerDialog(id,500,DIALOG_STYLE_MSGBOX,vardas , msg,"Yes","No");
            return 1;
pawn Код:
if(dialogid == 500)
{
    if(response)
    {
        new vardas[MAX_PLAYER_NAME];
        strmid(vardas,imputtext[5],0,MAX_PLAYER_NAME);
        new id = GetPlayeridMid(vardas);
        new Float:tempcoo[3];
        GetPlayerPos(playerid,tempcoo[0],tempcoo[1],tempcoo[2]);
        SetPlayerPos(id,tempcoo[0],tempcoo[1],tempcoo[2]);
        SetCameraBehindPlayer(id);
        SetPlayerInterior(id,GetPlayerInterior(playerid));
    }
    return 1;
}
Not work :/
Reply
#3

Please do us a favour and:

Indent sensibly
Use [pawn] tags instead of [code] tags

Do yourself a favour and:

Use ZCMD instead of strcmp.

That's all for now.
Reply
#4

Bump
Reply
#5

Quote:
Originally Posted by PrivatioBoni
Посмотреть сообщение
Please do us a favour and:

Indent sensibly
Use [pawn] tags instead of [code] tags

Do yourself a favour and:

Use ZCMD instead of strcmp.

That's all for now.
Changed
Reply
#6

PLZ help :/
Reply
#7

I didn't get you man, sorry.
What are you looking for?
By the way, use ZCMD and SSCANF please!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)