Announce Cmd -
Geeboi_Mehdi - 28.08.2012
I Use a PPC Admin System Here is 1 Cmd From PPC:
// Repairs all vehicles
COMMAND:repairall(playerid, params[])
{
// Send the command to all admins so they can see it
SendAdminText(playerid, "/repairall", params);
// Check if the player has logged in
if (APlayerData[playerid][LoggedIn] == true)
{
// Check if the player's admin-level is at least 3
if (APlayerData[playerid][PlayerLevel] >= 3)
{
// Loop through all vehicles
for (new i; i < 2000; i++)
RepairVehicle(i); // Fully repair the vehicle (damage value and bodywork)
// Send all players a message to inform them that all vehicles have been repaired
SendClientMessageToAll(0x00FF00FF, "All vehicles have been successfully repaired!");
}
else
return 0;
}
else
return 0;
// Let the server know that this was a valid command
return 1;
}
To use The Announce Cmd I U have It Be level 1 Any Help?
Re: Announce Cmd -
C00K13M0N$73R - 28.08.2012
pawn Код:
CMD:announce(playerid,params[])
{
if (APlayerData[playerid][LoggedIn] == true)
{
if (APlayerData[playerid][PlayerLevel] >= 1)
{
if(insull(params)) return SendClientMessage(playerid,-1,"/announce text");
GameTextForAll(params,5000,3);
}
}
return 1;
}
Re: Announce Cmd -
Geeboi_Mehdi - 28.08.2012
i got Error
pawn Код:
C:\Users\Daoud\Desktop\Trucking Life\pawno\include\PPC_PlayerCommands.inc(5095) : error 017: undefined symbol "insull"
C:\Users\Daoud\Desktop\Trucking Life\gamemodes\PPC_Trucking.pwn(943) : warning 217: loose indentation
C:\Users\Daoud\Desktop\Trucking Life\gamemodes\PPC_Trucking.pwn(1108) : warning 217: loose indentation
C:\Users\Daoud\Desktop\Trucking Life\gamemodes\PPC_Trucking.pwn(3528) : warning 217: loose indentation
C:\Users\Daoud\Desktop\Trucking Life\gamemodes\PPC_Trucking.pwn(3543) : warning 217: loose indentation
C:\Users\Daoud\Desktop\Trucking Life\gamemodes\PPC_Trucking.pwn(3948) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.;
Re: Announce Cmd -
MarinacMrcina - 28.08.2012
Quote:
Originally Posted by Geeboi_Mehdi
i got Error
pawn Код:
C:\Users\Daoud\Desktop\Trucking Life\pawno\include\PPC_PlayerCommands.inc(5095) : error 017: undefined symbol "insull" C:\Users\Daoud\Desktop\Trucking Life\gamemodes\PPC_Trucking.pwn(943) : warning 217: loose indentation C:\Users\Daoud\Desktop\Trucking Life\gamemodes\PPC_Trucking.pwn(1108) : warning 217: loose indentation C:\Users\Daoud\Desktop\Trucking Life\gamemodes\PPC_Trucking.pwn(3528) : warning 217: loose indentation C:\Users\Daoud\Desktop\Trucking Life\gamemodes\PPC_Trucking.pwn(3543) : warning 217: loose indentation C:\Users\Daoud\Desktop\Trucking Life\gamemodes\PPC_Trucking.pwn(3948) : warning 217: loose indentation Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.;
|
Here you have the "fixed" version.Only a small typo.
pawn Код:
CMD:announce(playerid,params[])
{
if (APlayerData[playerid][LoggedIn] == true)
{
if (APlayerData[playerid][PlayerLevel] >= 1)
{
if(isnull(params)) return SendClientMessage(playerid,-1,"/announce text");
GameTextForAll(params,5000,3);
}
}
return 1;
}
Re: Announce Cmd -
Devilxz97 - 29.08.2012
pawn Код:
#include zcmd
#include sscanf2
CMD:announce(playerid,params[])
{
new str[256];
if (APlayerData[playerid][LoggedIn] == true)
{
if (APlayerData[playerid][PlayerLevel] >= 1)
{
if(sscanf(params, "s", str)) return SendClientMessage(playerid, -1, "Usage: /announce [Announce Msg]");
format(str, sizeof(str), "%s", str);
GameTextForAll(str, 5000, 3);
}
else return SendClientMessage(playerid, -1, "you need to be an admin to use this commands!");
}
else return SendClientMessage(playerid, -1, "You need to be logged in to use this commands.");
return 1;
}
Re: Announce Cmd -
Geeboi_Mehdi - 29.08.2012
Thank u U are Reped
Re: Announce Cmd -
Devilxz97 - 29.08.2012
works ?
the comments update.
pawn Код:
GameTextForAll(string, 5000, 3);
to
pawn Код:
GameTextForAll(str, 5000, 3);
string to str.