new
n[MAX_PLAYER_NAME];
GetPlayerName(playerid,n,sizeof(n));
if(!strcmp(n,"Sal_Kings")) // the rest.
//==================================<[freeze]>=============================================================
if(strcmp(cmd, "/freeze", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /freeze [playerid/PartOfName]");
return 1;
}
new playa;
playa = ReturnUser(tmp);
if(PlayerInfo[playa][pAdmin] > 0)
{
SendClientMessage(playerid, COLOR_GRAD2, "Admins can not be frozen");
return 1;
}
if (PlayerInfo[playerid][pAdmin] >= 2)
{
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
TogglePlayerControllable(playa, 0);
format(string, sizeof(string), "AdmCmd: %s Freezes %s",sendername, giveplayer);
printf("%s",string);
format(string, sizeof(string), "AdmCmd: %s was Frozen by %s",giveplayer ,sendername);
ABroadCast(COLOR_LIGHTRED,string,1);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command!");
}
}
return 1;
}
//==================================<[unfreeze]>=============================================================
if(strcmp(cmd, "/unfreeze", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /unfreeze [playerid]");
return 1;
}
new playa;
playa = ReturnUser(tmp);
if (PlayerInfo[playerid][pAdmin] >= 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), "AdmCmd: %s UnFroze %s",sendername, giveplayer);
printf("%s",string);
format(string, sizeof(string), "AdmCmd: %s was UnFrozen by %s",giveplayer ,sendername);
ABroadCast(COLOR_LIGHTRED,string,1);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " 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_GRAD2, "USAGE: /freeze [playerid/PartOfName]");
return 1;
}
new playa;
playa = ReturnUser(tmp);
if(PlayerInfo[playa][pAdmin] > 0)
{
SendClientMessage(playerid, COLOR_GRAD2, "Admins can not be frozen");
return 1;
}
if (PlayerInfo[playerid][pAdmin] >= 2)
{
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
TogglePlayerControllable(playa, 0);
format(string, sizeof(string), "AdmCmd: %s Freezes %s",sendername, giveplayer);
printf("%s",string);
format(string, sizeof(string), "AdmCmd: %s was Frozen by %s",giveplayer ,sendername);
ABroadCast(COLOR_LIGHTRED,string,1);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command!");
}
}
return 1;
}
C:\Documents and Settings\home\Desktop\samp02Xserver.win32\gamemodes\_gamemodes__gamemodes_SalsTestingGrounds.pwn(811) : error 017: undefined symbol "cmd" C:\Documents and Settings\home\Desktop\samp02Xserver.win32\gamemodes\_gamemodes__gamemodes_SalsTestingGrounds.pwn(815) : error 017: undefined symbol "tmp" C:\Documents and Settings\home\Desktop\samp02Xserver.win32\gamemodes\_gamemodes__gamemodes_SalsTestingGrounds.pwn(815) : error 017: undefined symbol "strtok" C:\Documents and Settings\home\Desktop\samp02Xserver.win32\gamemodes\_gamemodes__gamemodes_SalsTestingGrounds.pwn(816) : error 017: undefined symbol "tmp" C:\Documents and Settings\home\Desktop\samp02Xserver.win32\gamemodes\_gamemodes__gamemodes_SalsTestingGrounds.pwn(818) : error 017: undefined symbol "COLOR_GRAD2" C:\Documents and Settings\home\Desktop\samp02Xserver.win32\gamemodes\_gamemodes__gamemodes_SalsTestingGrounds.pwn(822) : error 017: undefined symbol "ReturnUser" C:\Documents and Settings\home\Desktop\samp02Xserver.win32\gamemodes\_gamemodes__gamemodes_SalsTestingGrounds.pwn(823) : error 017: undefined symbol "PlayerInfo" C:\Documents and Settings\home\Desktop\samp02Xserver.win32\gamemodes\_gamemodes__gamemodes_SalsTestingGrounds.pwn(823) : warning 215: expression has no effect C:\Documents and Settings\home\Desktop\samp02Xserver.win32\gamemodes\_gamemodes__gamemodes_SalsTestingGrounds.pwn(823) : error 001: expected token: ";", but found "]" C:\Documents and Settings\home\Desktop\samp02Xserver.win32\gamemodes\_gamemodes__gamemodes_SalsTestingGrounds.pwn(823) : error 029: invalid expression, assumed zero C:\Documents and Settings\home\Desktop\samp02Xserver.win32\gamemodes\_gamemodes__gamemodes_SalsTestingGrounds.pwn(823) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 10 Errors.
|
Originally Posted by Anarkien
Sal_Kings.. Of course you'll have to modify the script, you can't just copy-paste it like that.
You'll have to define certain things. |
C:\Documents and Settings\home\Desktop\samp02Xserver.win32\gamemodes\_gamemodes__gamemodes_SalsTestingGrounds.pwn(815) : error 017: undefined symbol "strtok"
tmp = strtok(cmdtext, idx);
|
Originally Posted by MenaceX^
Uhh, people just copy to you codes from their GF scripts.
|
|
Originally Posted by Sal_Kings
Quote:
|