PDA

View Full Version : Small Adding map to script help.


Clergy
06/06/2014, 05:37 AM
hello,

i tried adding Removebuildingforplayer map under filterscriptinit and gamemodeinit

but nuthin happens....

your help will do a great favour for me.

regards,

Adityz
06/06/2014, 05:38 AM
Place it under Public OnPlayerConnect(playerid). It doesn't work if we place it under OnFilterScriptInit() / OnGameModeInit() as they don't have the playerid parameter.

Mriss
06/06/2014, 05:38 AM
Do RemoveBuildingForPlayer under Onplayerconnect and compile it...

Parallex
06/06/2014, 06:06 AM
hello,

i tried adding Removebuildingforplayer map under filterscriptinit and gamemodeinit

but nuthin happens....

your help will do a great favour for me.

regards,

OnGameModeInit or OnFilterscriptinIt have no "playerid" parameters. Whereas, Remove building code is like this: RemoveBuldingForPlayer(playerid, .....
You placed it in a wrong place and I'm sure you didn't even tried to compile the script, because, if you did - you may have got errors "Undefined Symbol "playerid" ".
Conclusion: Place RemoveBuldingForPlayer code under;

public OnPlayerConnect(playerid)
{
// Remove Bulding code here.
return 1;
}

The code which need to be under OnGameModeInit or OnFilterscriptInit is the CreateObject, CreateDynamicObject or whatever plugin you are using.

P.S: Don't forget to compile.