- 0
Ajutor va rog
-
Similar Content
-
Recently Browsing 0 members
- No registered users viewing this page.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.
Question
alexutu
Salut,am si eu o problema am incercat sa creez comanda /resapwnme /slapme /unfreezeme dar am o problema,merg bine dar vip pot resawpnda si alti playeri iar eu nu vreau asta vr sa ii respawndeze direct pe vipi fara a mai cere as isi scire numele/id.Multumesc anticipat
[pawn] if(strcmp(cmd, "/respawnme", true) == 0) //By
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "{00A1FF}USAGE{FFFFFF}: /respawnme [Numele tau]");
return 1;
}
new playa;
playa = ReturnUser(tmp);
if(PlayerInfo[playerid][pDonateRank] == 1)
{
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
if(PlayerInfo[playa][pJailed] == 1)
{
SendClientMessage(playerid,COLOR_GREY," You can`t use this command on that player because is in jail !");
return 1;
}
if(WantedLevel[playa] >= 1)
{
SendClientMessage(playerid,COLOR_GREY," You can`t use this command on that player, is currently Wanted !");
return 1;
}
//if(SpawnChange[playerid])
{
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
SpawnPlayer(playa);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* You have respawned vip %s.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTRED, string);
format(string, sizeof(string), "* You have been respawned by Server %s.", sendername);
SendClientMessage(playa, COLOR_LIGHTRED, string);
format(string, 128, "{FF2C00}Vipcmd: {33FF33}%s {FFFFFF}has respawned the vip {33FF33}%s {FF2C00}(/respawnme).", sendername, giveplayer);
ABroadCast(COLOR_YELLOW,string,1);
HBroadCast(COLOR_YELLOW,string);
return 1;
}
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Nu ai voie sa folosesti aceasta comanda!");
}
}
return 1;
}[/pawn]
[pawn] if(strcmp(cmd, "/slapme", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "{00A1FF}USAGE{FFFFFF}: /slapme [Numele tau]");
return 1;
}
if(PlayerInfo[playerid][pLocal] == 99)
{
SendClientMessage(playerid, COLOR_GRAD2, "You can`t use this command in this place");
return 1;
}
new playa;
new Float:slx, Float:sly, Float:slz;
playa = ReturnUser(tmp);
if(PlayerInfo[playerid][pDonateRank] == 1)
{
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerPos(playa, slx, sly, slz);
SetPlayerPos(playa, slx, sly, slz+5);
PlayerPlaySound(playa, 1130, slx, sly, slz+5);
printf("AdmCmd: %s slapped %s",sendername, giveplayer);
format(string, sizeof(string), "{FF2C00}AdmCmd: {33FF33}%s {FFFFFF}was slapped by {33FF33}Server",giveplayer ,sendername);
ABroadCast(COLOR_LIGHTRED,string,1);
format(string, sizeof(string), "You have been slaped by admin {F81414}%s", sendername);
SendClientMessage(playa, COLOR_WHITE, string);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "Nu esti autorizat sa folosesti aceasta comanda!");
}
}
return 1;
}[/pawn]
[pawn] if(strcmp(cmd, "/unfreezeme", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "{00A1FF}USAGE{FFFFFF}: /unfreeze [Numele tau]");
return 1;
}
new playa;
playa = ReturnUser(tmp);
if(PlayerInfo[playerid][pDonateRank] == 1)
{
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
TogglePlayerControllable(playa, 1);
format(string, sizeof(string), "{FF2C00}FunTeam RPG: {33FF33} %s {FFFFFF}UnFroze {33FF33}%s",sendername, giveplayer);
printf("%s",string);
format(string, sizeof(string), "{FF2C00}FunTeam RPG: {33FF33}%s {FFFFFF}was UnFrozen by {33FF33}%s",giveplayer ,sendername);
ABroadCast(COLOR_LIGHTRED,string,1);
format(string, sizeof(string), "You have been unfrozen by Server {F81414}Server", sendername);
SendClientMessage(playa, COLOR_WHITE, string);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command!");
}
}
return 1;
}[/pawn]
(?_?_?_?(???????????(??_?_?_??K??E??N??T?????????_?_?_?_?()??
2 answers to this question
Recommended Posts