if(strcmp(cmd, "/unfreeze", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "(USAGE) /unfreeze [playerid/partofname]");
return 1;
}
new playa;
playa = ReturnUser(tmp);
if (PlayerInfo[playerid][pAdmin] >= 1)
{
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
TogglePlayerControllable(playa, 1);
format(string, sizeof(string), "You got unfrozen by %s",sendername);
SendClientMessage(playa,COLOR_RED,string);
format(string, sizeof(string), "You've unfrozen %s",giveplayer);
SendClientMessage(playerid,COLOR_RED,string);
}
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "Attempt denied! You are not authorized to use that command!");
}
}
return 1;
}
if(strcmp(cmd, "/freeze", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "(USAGE) /unfreeze [playerid/partofname]");
return 1;
}
new playa;
playa = ReturnUser(tmp);
if (PlayerInfo[playerid][pAdmin] >= 1)
{
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
TogglePlayerControllable(playa, 0);
format(string, sizeof(string), "You got frozen by %s",sendername);
SendClientMessage(playa,COLOR_RED,string);
format(string, sizeof(string), "You frozen %s",giveplayer);
SendClientMessage(playerid,COLOR_RED,string);
}
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "Attempt denied! You are not authorized to use that command!");
}
}
return 1;
}
|
Originally Posted by pmk1
isn't it already in your script? lol i think i don't get what you want...
|

if(strcmp(cmd, "/unfreeze", true) == 0)
{
new pNaME[MAX_PLAYER_NAME];
GetPlayerName(playerid,pNaME,sizeof(pNaME));
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "(USAGE) /unfreeze [playerid/partofname]");
return 1;
}
new playa;
playa = ReturnUser(tmp);
if (PlayerInfo[playerid][pAdmin] >= 1)
{
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
TogglePlayerControllable(playa, 1);
format(string, sizeof(string), "You got unfrozen by %s",pNaME);
SendClientMessage(playa,COLOR_RED,string);
format(string, sizeof(string), "You've unfrozen %s",playa);
SendClientMessage(playerid,COLOR_RED,string);
}
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "Attempt denied! You are not authorized to use that command!");
}
}
return 1;
}
if(strcmp(cmd, "/freeze", true) == 0)
{
new pNamE[MAX_PLAYER_NAME];
GetPlayerName(playerid,pNamE,sizeof(pNamE));
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "(USAGE) /unfreeze [playerid/partofname]");
return 1;
}
new playa;
playa = ReturnUser(tmp);
if (PlayerInfo[playerid][pAdmin] >= 1)
{
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
TogglePlayerControllable(playa, 0);
format(string, sizeof(string), "You got frozen by %s",pNamE);
SendClientMessage(playa,COLOR_RED,string);
format(string, sizeof(string), "You frozen %s",playa);
SendClientMessage(playerid,COLOR_RED,string);
}
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "Attempt denied! You are not authorized to use that command!");
}
}
return 1;
}

if(strcmp(cmd, "/unfreeze", true) == 0)
{
new string128[128];
new pNaME[MAX_PLAYER_NAME];
GetPlayerName(playerid,pNaME,sizeof(pNaME));
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "(USAGE) /unfreeze [playerid/partofname]");
return 1;
}
new playa;
playa = ReturnUser(tmp);
if (PlayerInfo[playerid][pAdmin] >= 1)
{
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
TogglePlayerControllable(playa, 1);
format(string, sizeof(string), "You got unfrozen by %s",pNaME);
SendClientMessage(playa,COLOR_RED,string);
format(string128, sizeof(string128), "You've unfrozen %s",playa);
SendClientMessage(playerid,COLOR_RED,string);
}
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "Attempt denied! You are not authorized to use that command!");
}
}
return 1;
}
if(strcmp(cmd, "/freeze", true) == 0)
{
new string128[128];
new pNamE[MAX_PLAYER_NAME];
GetPlayerName(playerid,pNamE,sizeof(pNamE));
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "(USAGE) /unfreeze [playerid/partofname]");
return 1;
}
new playa;
playa = ReturnUser(tmp);
if (PlayerInfo[playerid][pAdmin] >= 1)
{
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
TogglePlayerControllable(playa, 0);
format(string, sizeof(string), "You got frozen by %s",pNamE);
SendClientMessage(playa,COLOR_RED,string);
format(string128, sizeof(string128), "You frozen %s",playa);
SendClientMessage(playerid,COLOR_RED,string);
}
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "Attempt denied! You are not authorized to use that command!");
}
}
return 1;
}