CMD:kick(playerid, params[]) { if(IsPlayerAdmin(playerid)) { SendClientMessage(playerid, COLOR_RED, "You have been kicked from the server!"); } SetTimerEx("DelayedKick", 1000, false, "i", playerid); { forward DelayedKick(playerid); public DelayedKick(playerid); } Kick(playerid); { else } SendClientMessage(playerid, -1, "SERVER: Unknown command."); { return 1; } |
forward DelayedKick(playerid); |
Guess what, I understood almost everything of the code, So I guess I understand the basic script.
The only thing I didn't understand is, What does that mean? What does forwarding mean lol? |
C:\Users\anoll\Desktop\samp03z_svr_R1_win32\gamemo des\practice.pwn(38 ![]() C:\Users\anoll\Desktop\samp03z_svr_R1_win32\gamemo des\practice.pwn(389) : error 029: invalid expression, assumed zero C:\Users\anoll\Desktop\samp03z_svr_R1_win32\gamemo des\practice.pwn(389) : warning 215: expression has no effect C:\Users\anoll\Desktop\samp03z_svr_R1_win32\gamemo des\practice.pwn(390) : error 029: invalid expression, assumed zero C:\Users\anoll\Desktop\samp03z_svr_R1_win32\gamemo des\practice.pwn(390) : warning 215: expression has no effect Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors. |
Yeah I know that, it's in miliseconds.
And @karan007, I try just to make a kick command, Afterwards I will take a look in tut's and ****** how to make it like "USAGE: /kick [ID]". But I get the following errors/warnings: |
376:CMD:kick(playerid, params[]) 377:{ 378: if(IsPlayerAdmin(playerid)) 379: { 380: SendClientMessage(playerid, COLOR_RED, "You have been kicked from the server!"); 381: SetTimerEx("DelayedKick", 1000, false, "i", playerid); 382: } 383: else 384: { 385: SendClientMessage(playerid, -1, "SERVER: Unknown command."); 386: } 387: forward DelayedKick(playerid); 388: public DelayedKick(playerid); 389: { 390: Kick(playerid); 391: return 1; 392:} |
C:\Users\anoll\Desktop\samp03z_svr_R1_win32\gamemo des\practice.pwn(387) : error 029: invalid expression, assumed zero C:\Users\anoll\Desktop\samp03z_svr_R1_win32\gamemo des\practice.pwn(387) : warning 215: expression has no effect C:\Users\anoll\Desktop\samp03z_svr_R1_win32\gamemo des\practice.pwn(38 ![]() C:\Users\anoll\Desktop\samp03z_svr_R1_win32\gamemo des\practice.pwn(38 ![]() C:\Users\anoll\Desktop\samp03z_svr_R1_win32\gamemo des\practice.pwn(412) : error 030: compound statement not closed at the end of file (started at line 37 ![]() Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 3 Errors. |