C:\Documents and Settings\000\Desktop\samp03z_svr_R1_win32\pawno\in clude\sscanf2.inc(305) : warning 219: local variable "string" shadows a variable at a preceding level C:\Documents and Settings\000\Desktop\samp03z_svr_R1_win32\pawno\in clude\sscanf2.inc(305) : warning 219: local variable "string" shadows a variable at a preceding level C:\Documents and Settings\000\Desktop\samp03z_svr_R1_win32\pawno\in clude\sscanf2.inc(365) : warning 219: local variable "string" shadows a variable at a preceding level C:\Documents and Settings\000\Desktop\samp03z_svr_R1_win32\pawno\in clude\sscanf2.inc(365) : warning 219: local variable "string" shadows a variable at a preceding level C:\Documents and Settings\000\My Documents\ffff\gamemodes\barron.pwn(683) : error 055: start of function body without function header C:\Documents and Settings\000\My Documents\ffff\gamemodes\barron.pwn(686) : error 021: symbol already defined: "format" C:\Documents and Settings\000\My Documents\ffff\gamemodes\barron.pwn(689) : error 010: invalid function or declaration C:\Documents and Settings\000\My Documents\ffff\gamemodes\barron.pwn(693) : error 010: invalid function or declaration C:\Documents and Settings\000\My Documents\ffff\gamemodes\barron.pwn(695) : warning 203: symbol is never used: "string" |
forward JailTimer(playerid);
public JailTimer(playerid);
{
PlayerSeconds[playerid] --;//The timer get called every 1 second. so we will decrease his variable - 1 every second.
new string[24];
format(string,sizeof(string),"00:0%d",PlayerSeconds[playerid]);
TextDrawSetString(JailTimer3[playerid],string);
GivePlayerMoney(playerid,-200);//So you will take $200 from him everytime.
if(PlayerSeconds[playerid] <= 0)//If the jail time ends.
{
KillTimer(PlayerTimer[playerid]);//Here we will stop the timer from getting called.
}
return true;
}
new PlayerSeconds[MAX_PLAYERS] = 10; new PlayerTimer[MAX_PLAYERS]; //This is used to store the timer id. SetTimerEx(..); |
PlayerSeconds[playerid] = 10;//Just to make sure its 10 seconds. PlayerTimer[playerid] = SetTimerEx("JailTimer",1000,true,"i",playerid); |
C:\Documents and Settings\000\My Documents\ffff\gamemodes\barron.pwn(4) : error 017: undefined symbol "PlayerSeconds" C:\Documents and Settings\000\My Documents\ffff\gamemodes\barron.pwn(6) : error 017: undefined symbol "format" C:\Documents and Settings\000\My Documents\ffff\gamemodes\barron.pwn(6) : warning 215: expression has no effect C:\Documents and Settings\000\My Documents\ffff\gamemodes\barron.pwn(6) : warning 215: expression has no effect C:\Documents and Settings\000\My Documents\ffff\gamemodes\barron.pwn(6) : warning 215: expression has no effect C:\Documents and Settings\000\My Documents\ffff\gamemodes\barron.pwn(6) : error 017: undefined symbol "PlayerSeconds" C:\Documents and Settings\000\My Documents\ffff\gamemodes\barron.pwn(6) : error 029: invalid expression, assumed zero C:\Documents and Settings\000\My Documents\ffff\gamemodes\barron.pwn(6) : fatal error 107: too many error messages on one line |
CMD:arrest(playerid, params[])
{
new targetid;
if(sscanf(params, "u", targetid))
{
SendClientMessage(playerid,COLOR_ERROR,"USAGE: /Arrest (Player Name/PlayerID)");
return 1;
}
new Float:x, Float:y, Float:z;
GetPlayerPos(targetid, x, y, z);
if(!IsPlayerInRangeOfPoint(targetid, 5.0, x, y, z)) return SendClientMessage(playerid, COLOR_RED, "You aren't near that player.");
if(GetPlayerWantedLevel(targetid) < 4) return SendClientMessage(playerid, COLOR_RED, "That player is not wanted!");
SetPlayerInterior(targetid, 3);
new RandomG = random(sizeof(RandomSpawnCLIVINS));
SetPlayerPos(targetid, RandomSpawnJail[RandomG][0], RandomSpawnJail[RandomG][1], RandomSpawnJail[RandomG][2]);
SetPlayerFacingAngle(targetid, RandomSpawnJail[RandomG][3]);
GivePlayerMoney(playerid, 1000+random(9000));
SetPlayerScore(playerid, GetPlayerScore(playerid) + 1);
SetPlayerScore(targetid, GetPlayerScore(targetid) - 1);
SetPlayerHealth(targetid, 10000000000.0);
SetPlayerWantedLevel(targetid, 0);
ResetPlayerWeapons(targetid);
TextDrawShowForPlayer(playerid, JailTimer0);
TextDrawShowForPlayer(playerid, JailTimer1);
TextDrawShowForPlayer(playerid, JailTimer2);
TextDrawShowForPlayer(playerid, JailTimer3);
TextDrawShowForPlayer(playerid, JailTimer4);
PlayerSeconds[playerid] = 10;//Just to make sure its 10 seconds.
PlayerTimer[playerid] = SetTimerEx("JailTimer",1000,true,"i",playerid);
return 1;
}
CMD:arrest(playerid, params[]) { new targetid; if(sscanf(params, "u", targetid)) { SendClientMessage(playerid,COLOR_ERROR,"USAGE: /Arrest (Player Name/PlayerID)"); return 1; } new Float:x, Float:y, Float:z; GetPlayerPos(targetid, x, y, z); if(!IsPlayerInRangeOfPoint(playerid, 5.0, x, y, z)) return SendClientMessage(playerid, COLOR_RED, "You aren't near that player."); if(GetPlayerWantedLevel(targetid) < 4) return SendClientMessage(playerid, COLOR_RED, "That player is not wanted!"); SetPlayerInterior(targetid, 3); new RandomG = random(sizeof(RandomSpawnCLIVINS)); SetPlayerPos(targetid, RandomSpawnJail[RandomG][0], RandomSpawnJail[RandomG][1], RandomSpawnJail[RandomG][2]); SetPlayerFacingAngle(targetid, RandomSpawnJail[RandomG][3]); GivePlayerMoney(playerid, 1000+random(9000)); SetPlayerScore(playerid, GetPlayerScore(playerid) + 1); SetPlayerScore(targetid, GetPlayerScore(targetid) - 1); SetPlayerHealth(targetid, 10000000000.0); SetPlayerWantedLevel(targetid, 0); ResetPlayerWeapons(targetid); //You need to show him the textdraws! (targetid) TextDrawShowForPlayer(targetid, JailTimer0); TextDrawShowForPlayer(targetid, JailTimer1); TextDrawShowForPlayer(targetid, JailTimer2); TextDrawShowForPlayer(targetid, JailTimer3); TextDrawShowForPlayer(targetid, JailTimer4); //You need to set:targetid for seconds and Timer! Otherwise you go to prison :) PlayerSeconds[targetid] = 10;//Just to make sure its 10 seconds. PlayerTimer[targetid] = SetTimerEx("JailTimer",1000,true,"i",targetid); return 1; }
C:\Documents and Settings\000\My Documents\ffff\gamemodes\barron.pwn(4) : error 017: undefined symbol "PlayerSeconds" C:\Documents and Settings\000\My Documents\ffff\gamemodes\barron.pwn(6) : error 017: undefined symbol "format" C:\Documents and Settings\000\My Documents\ffff\gamemodes\barron.pwn(6) : warning 215: expression has no effect C:\Documents and Settings\000\My Documents\ffff\gamemodes\barron.pwn(6) : warning 215: expression has no effect C:\Documents and Settings\000\My Documents\ffff\gamemodes\barron.pwn(6) : warning 215: expression has no effect C:\Documents and Settings\000\My Documents\ffff\gamemodes\barron.pwn(6) : error 017: undefined symbol "PlayerSeconds" C:\Documents and Settings\000\My Documents\ffff\gamemodes\barron.pwn(6) : error 029: invalid expression, assumed zero C:\Documents and Settings\000\My Documents\ffff\gamemodes\barron.pwn(6) : fatal error 107: too many error messages on one line |
PlayerSeconds[playerid] --;//The timer get called every 1 second. so we will decrease his variable - 1 every second. |
format(string,sizeof(string),"00:0%d",PlayerSecond s[playerid]); |
new PlayerSeconds[MAX_PLAYERS] = 10; new PlayerTimer[MAX_PLAYERS]; //This is used to store the timer id. SetTimerEx(..); |
#include <a_samp> #include <zcmd> #include <sscanf2> #include <Streamer> #include <foreach> |