Cmd doesn't work
#1

Код:
COMMAND:ismesti(playerid, params[])
{
if(PlayerInfo[playerid][pPgaujosvadas] == 0) return SendClientMessage( playerid, -1, "Tu ne mafijos vadas!" );
new giveplayerid,pName[24],gName[24],string[100];
if(sscanf(params, "d", giveplayerid))return SendClientMessage(playerid, 0xFFFFFFFF, "/ismesti [ћaidėjo ID]");
else if(!IsPlayerConnected(giveplayerid))return SendClientMessage(playerid, 0xFF0000FF, "Tokio ћaidėjo nėra!");
else
{
GetPlayerName(playerid, pName,24);
GetPlayerName(giveplayerid,gName,24);
PlayerInfo[giveplayerid][pGaujoi] = false;
format(string, sizeof(string),"Iљmetėte ћaidėją %s",gName);
SendClientMessage(playerid,0xFFFFFFAA,string);
SendClientMessage(giveplayerid,0xFFFFFFAA,"Jūs iљmestas iљ mafijos.");
}
This CMD works only with /ismesti [ID], how to make to player can write /ismesti player nickname or player id?
Reply
#2

Try using this;
Код:
COMMAND:ismesti(playerid, params[])
{
if(PlayerInfo[playerid][pPgaujosvadas] == 0) return SendClientMessage( playerid, -1, "Tu ne mafijos vadas!" );
new giveplayerid,pName[24],gName[24],string[100];
if(sscanf(params, "u", giveplayerid))return SendClientMessage(playerid, 0xFFFFFFFF, "/ismesti [žaidėjo ID]");
else if(!IsPlayerConnected(giveplayerid))return SendClientMessage(playerid, 0xFF0000FF, "Tokio žaidėjo nėra!");
else
{
GetPlayerName(playerid, pName,24);
GetPlayerName(giveplayerid,gName,24);
PlayerInfo[giveplayerid][pGaujoi] = false;
format(string, sizeof(string),"Išmetėte žaidėją %s",gName);
SendClientMessage(playerid,0xFFFFFFAA,string);
SendClientMessage(giveplayerid,0xFFFFFFAA,"Jūs išmestas iš mafijos.");
}
Reply
#3

Quote:
Originally Posted by -Luis
Посмотреть сообщение
Try using this;
Код:
COMMAND:ismesti(playerid, params[])
{
if(PlayerInfo[playerid][pPgaujosvadas] == 0) return SendClientMessage( playerid, -1, "Tu ne mafijos vadas!" );
new giveplayerid,pName[24],gName[24],string[100];
if(sscanf(params, "u", giveplayerid))return SendClientMessage(playerid, 0xFFFFFFFF, "/ismesti [ћaidėjo ID]");
else if(!IsPlayerConnected(giveplayerid))return SendClientMessage(playerid, 0xFF0000FF, "Tokio ћaidėjo nėra!");
else
{
GetPlayerName(playerid, pName,24);
GetPlayerName(giveplayerid,gName,24);
PlayerInfo[giveplayerid][pGaujoi] = false;
format(string, sizeof(string),"Iљmetėte ћaidėją %s",gName);
SendClientMessage(playerid,0xFFFFFFAA,string);
SendClientMessage(giveplayerid,0xFFFFFFAA,"Jūs iљmestas iљ mafijos.");
}
Same.
Reply
#4

any ideas?
Reply
#5

any ideas?
Reply
#6

Dude, don't bump like that, wait until 12 hours have passed.
Reply
#7

What I should do? Wait 12 hours and dont don't receive any answser?
Reply
#8

Just be patient.. If nobody replies, nobody replies. Keep bumping like that and you'll receive an infraction leading to a ban no doubt.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)