28.03.2010, 13:14
appologies for double post,
just thaught
try this ( not tested)
new killer[MAX_PLAYERS];
OnGameModeInit
killer = 0;
Then in ur code
if (strcmp("/createminigun", cmdtext, true, 14) == 0)
if (GetPlayerScore(killerid) == 10)
{
killer = 0;
new Float:createx, Float:createy, Float:createz, Float:Rotation;
GetPlayerPos(playerid,createx,createy,createz);
GetPlayerFacingAngle(playerid,Rotation);
SaveMinigunDataToLog(CreateMinigun(createx,createy ,createz -1,Rotation,10,4,true),"blub");
return 1
then something like if killer = 1;
{
SendClientMessage(playerid,COLOR_RED,"Error,You have used this already");
}
Not testedd, Just anexample
just thaught
try this ( not tested)
new killer[MAX_PLAYERS];
OnGameModeInit
killer = 0;
Then in ur code
if (strcmp("/createminigun", cmdtext, true, 14) == 0)
if (GetPlayerScore(killerid) == 10)
{
killer = 0;
new Float:createx, Float:createy, Float:createz, Float:Rotation;
GetPlayerPos(playerid,createx,createy,createz);
GetPlayerFacingAngle(playerid,Rotation);
SaveMinigunDataToLog(CreateMinigun(createx,createy ,createz -1,Rotation,10,4,true),"blub");
return 1
then something like if killer = 1;
{
SendClientMessage(playerid,COLOR_RED,"Error,You have used this already");
}
Not testedd, Just anexample