new work; public OnGameModeInit() { work = CreatePickup(1239, 23, 317.130615, 692.398498, 11.460937); return 1; } public OnPlayerPickUpPickup(playerid, pickupid) { if(pickupid == work) { SendClientMessage(playerid, COLOR_YELLOW, "Type /work to start working!"); } return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { if(!strcmp("/work",cmdtext)) { GetPlayerSkin(playerid); IsPlayerInRangeOfPoint(playerid, 7.0, 317.130615, 692.398498, 11.460937); SetPlayerSkin(playerid, 277); return 1; } return 0; }
new IsPlayerOnWork[MAX_PLAYERS];
// OnPlayerConnect
IsPlayerOnWork[playerid] = 0;
// OnDisconnect
IsPlayerOnWork[playerid] = 0;
// On Command /Work
if(!strcmp("/work",cmdtext))
{
if(IsPlayerOnWork[playerid] == 1)
{
IsPlayerOnWork[playerid] = 0;
SendClientMessage(playerid,-1,"You Are Now Off Duty!");
SetPlayerSkin(playerid, 277);
else
{
IsPlayerOnWork[playerid] = 1;
// More Code Of Yours
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp("/work",cmdtext))
{
if(IsPlayerInRangeOfPoint(playerid, 7.0, 317.130615, 692.398498, 11.460937))
{
GetPlayerSkin(playerid);
SetPlayerSkin(playerid, 277);
}
return 1;
}
return 1;
}
D:\servers\samp03e_svr_R2_win32\gamemodes\testing.pwn(143) : warning 217: loose indentation D:\servers\samp03e_svr_R2_win32\gamemodes\testing.pwn(143) : error 029: invalid expression, assumed zero D:\servers\samp03e_svr_R2_win32\gamemodes\testing.pwn(150) : warning 225: unreachable code D:\servers\samp03e_svr_R2_win32\gamemodes\testing.pwn(150) : warning 217: loose indentation D:\servers\samp03e_svr_R2_win32\gamemodes\testing.pwn(150) : error 029: invalid expression, assumed zero D:\servers\samp03e_svr_R2_win32\gamemodes\testing.pwn(150) : error 004: function "OnPlayerEnterVehicle" is not implemented D:\servers\samp03e_svr_R2_win32\gamemodes\testing.pwn(156) : warning 225: unreachable code D:\servers\samp03e_svr_R2_win32\gamemodes\testing.pwn(156) : error 029: invalid expression, assumed zero D:\servers\samp03e_svr_R2_win32\gamemodes\testing.pwn(156) : error 004: function "OnPlayerExitVehicle" is not implemented D:\servers\samp03e_svr_R2_win32\gamemodes\testing.pwn(162) : warning 225: unreachable code D:\servers\samp03e_svr_R2_win32\gamemodes\testing.pwn(162) : error 029: invalid expression, assumed zero D:\servers\samp03e_svr_R2_win32\gamemodes\testing.pwn(162) : error 004: function "OnPlayerStateChange" is not implemented D:\servers\samp03e_svr_R2_win32\gamemodes\testing.pwn(168) : warning 225: unreachable code D:\servers\samp03e_svr_R2_win32\gamemodes\testing.pwn(168) : error 029: invalid expression, assumed zero D:\servers\samp03e_svr_R2_win32\gamemodes\testing.pwn(168) : error 004: function "OnPlayerEnterCheckpoint" is not implemented D:\servers\samp03e_svr_R2_win32\gamemodes\testing.pwn(174) : warning 225: unreachable code D:\servers\samp03e_svr_R2_win32\gamemodes\testing.pwn(174) : error 029: invalid expression, assumed zero D:\servers\samp03e_svr_R2_win32\gamemodes\testing.pwn(174) : error 004: function "OnPlayerLeaveCheckpoint" is not implemented D:\servers\samp03e_svr_R2_win32\gamemodes\testing.pwn(180) : warning 225: unreachable code D:\servers\samp03e_svr_R2_win32\gamemodes\testing.pwn(180) : error 029: invalid expression, assumed zero D:\servers\samp03e_svr_R2_win32\gamemodes\testing.pwn(180) : error 004: function "OnPlayerEnterRaceCheckpoint" is not implemented D:\servers\samp03e_svr_R2_win32\gamemodes\testing.pwn(186) : warning 225: unreachable code D:\servers\samp03e_svr_R2_win32\gamemodes\testing.pwn(186) : error 029: invalid expression, assumed zero D:\servers\samp03e_svr_R2_win32\gamemodes\testing.pwn(186) : error 004: function "OnPlayerLeaveRaceCheckpoint" is not implemented D:\servers\samp03e_svr_R2_win32\gamemodes\testing.pwn(191) : warning 225: unreachable code D:\servers\samp03e_svr_R2_win32\gamemodes\testing.pwn(191) : error 029: invalid expression, assumed zero D:\servers\samp03e_svr_R2_win32\gamemodes\testing.pwn(191) : error 004: function "OnRconCommand" is not implemented D:\servers\samp03e_svr_R2_win32\gamemodes\testing.pwn(196) : warning 225: unreachable code D:\servers\samp03e_svr_R2_win32\gamemodes\testing.pwn(196) : error 029: invalid expression, assumed zero D:\servers\samp03e_svr_R2_win32\gamemodes\testing.pwn(196) : error 004: function "OnPlayerRequestSpawn" is not implemented D:\servers\samp03e_svr_R2_win32\gamemodes\testing.pwn(202) : warning 225: unreachable code D:\servers\samp03e_svr_R2_win32\gamemodes\testing.pwn(202) : error 029: invalid expression, assumed zero D:\servers\samp03e_svr_R2_win32\gamemodes\testing.pwn(202) : error 004: function "OnObjectMoved" is not implemented D:\servers\samp03e_svr_R2_win32\gamemodes\testing.pwn(208) : warning 225: unreachable code D:\servers\samp03e_svr_R2_win32\gamemodes\testing.pwn(208) : error 029: invalid expression, assumed zero D:\servers\samp03e_svr_R2_win32\gamemodes\testing.pwn(208) : error 004: function "OnPlayerObjectMoved" is not implemented D:\servers\samp03e_svr_R2_win32\gamemodes\testing.pwn(214) : warning 225: unreachable code D:\servers\samp03e_svr_R2_win32\gamemodes\testing.pwn(214) : error 029: invalid expression, assumed zero D:\servers\samp03e_svr_R2_win32\gamemodes\testing.pwn(214) : error 004: function "OnPlayerPickUpPickup" is not implemented D:\servers\samp03e_svr_R2_win32\gamemodes\testing.pwn(216) : error 017: undefined symbol "pickupid" Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 26 Errors.
new IsPlayerOnWork[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
IsPlayerOnWork[playerid] = 0;
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
IsPlayerOnWork[playerid] = 0;
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
{
if(IsPlayerOnWork[playerid] == 1)
{
IsPlayerOnWork[playerid] = 0;
SendClientMessage(playerid,-1,"You Are Now Off Duty!");
SetPlayerSkin(playerid, 0);
}
else
{
IsPlayerOnWork[playerid] = 1;
SendClientMessage(playerid,-1,"You Are Now On Duty!");
SetPlayerSkin(playerid, 277);
}
return 1;
}
return 0;
}
pawn Код:
|
This is what i meant, instead i told you to do this in commented areas, you like getting spoon-feeded.
|