Re: Change players max. Speed + teleport
Quote:
Originally Posted by BOYSplayCS
(Post 775059)
Pawn needs a repeat function.
Something like:
PHP Code:
public repeating_example(id) { case 1: { fm_strip_user_weapons(id); fm_give_item(id, "weapon_knife"); fm_give_item(id, "weapon_galil"); fm_give_item(id, "ammo_556nato"); fm_give_item(id, "ammo_556nato"); fm_give_item(id, "ammo_556nato"); fm_give_item(id, "weapon_smokegrenade"); fm_give_item(id, "weapon_hegrenade"); fm_give_item(id, "weapon_usp"); repeat_command(8) fm_give_item(id, "ammo_45acp"); repeat_command(0) fm_set_user_maxspeed( id, 265.0 ); fm_set_user_health(id, get_pcvar_num(DOD_AssaultHP)); fm_set_user_armor(id, get_pcvar_num(DOD_AssaultAR)); fm_set_rendering(id, kRenderFxGlowShell, 0, 255, 0, kRenderNormal, 170); } }
It would be easier cause you'd be able to repeat that command eight times and then move on with the script.
|
Oh ty,
i have it changed & must wait to test when im @ home.
how about the teleport? any idea?
EDIT :
PHP Code:
Welcome to the AMX Mod X 1.8.1-300 Compiler. Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team
Error: Undefined symbol "repeat_command" on line 476 Error: Undefined symbol "repeat_command" on line 478 Error: Undefined symbol "repeat_command" on line 496 Error: Undefined symbol "repeat_command" on line 498 Error: Undefined symbol "repeat_command" on line 512 Error: Undefined symbol "repeat_command" on line 514 Error: Undefined symbol "repeat_command" on line 516 Error: Undefined symbol "repeat_command" on line 518 Error: Undefined symbol "repeat_command" on line 519 Error: Undefined symbol "repeat_command" on line 521 Error: Undefined symbol "repeat_command" on line 534 Error: Undefined symbol "repeat_command" on line 536 Error: Undefined symbol "repeat_command" on line 538 Error: Undefined symbol "repeat_command" on line 540
14 Errors. Could not locate output file C:\Dokumente und Einstellungen\One\Desktop\DOD_CharactersMod.amx (compile failed).
here ma code :
PHP Code:
case 0: { fm_strip_user_weapons(id); fm_give_item(id, "weapon_knife"); fm_give_item(id, "weapon_m4a1"); fm_give_item(id, "ammo_556nato"); fm_give_item(id, "ammo_556nato"); fm_give_item(id, "ammo_556nato"); fm_give_item(id, "weapon_hegrenade"); fm_give_item(id, "weapon_glock18");
fm_set_user_health(id, get_pcvar_num(DOD_RifflemanHP)); fm_set_user_armor(id, get_pcvar_num(DOD_RifllemanAR)); fm_set_rendering(id, kRenderFxGlowShell, 0, 100, 0, kRenderNormal, 170); } case 1: { fm_strip_user_weapons(id); fm_give_item(id, "weapon_knife"); fm_give_item(id, "weapon_galil"); fm_give_item(id, "ammo_556nato"); fm_give_item(id, "ammo_556nato"); fm_give_item(id, "ammo_556nato"); fm_give_item(id, "weapon_smokegrenade"); fm_give_item(id, "weapon_hegrenade"); repeat_command(8) fm_give_item(id, "ammo_45acp"); repeat_command(0) fm_set_user_maxspeed( id, 265.0 ); fm_set_user_health(id, get_pcvar_num(DOD_AssaultHP)); fm_set_user_armor(id, get_pcvar_num(DOD_AssaultAR)); fm_set_rendering(id, kRenderFxGlowShell, 0, 255, 0, kRenderNormal, 170); } case 2: { fm_strip_user_weapons(id); fm_give_item(id, "weapon_knife"); fm_give_item(id, "weapon_ak47"); fm_give_item(id, "ammo_762nato"); fm_give_item(id, "ammo_762nato"); fm_give_item(id, "ammo_762nato"); fm_give_item(id, "weapon_hegrenade"); fm_give_item(id, "weapon_fiveseven"); repeat_command(4) fm_give_item(id, "ammo_57mm"); repeat_command(0) fm_set_user_health(id, get_pcvar_num(DOD_SuportHP)); fm_set_user_armor(id, get_pcvar_num(DOD_SuportAR)); fm_set_rendering(id, kRenderFxGlowShell, 124, 252, 0, kRenderNormal, 170); } case 3: { fm_strip_user_weapons(id); fm_give_item(id, "weapon_knife"); fm_give_item(id, "weapon_awp"); repeat_command(3) fm_give_item(id, "ammo_338magnum"); repeat_command(0) fm_give_item(id, "weapon_deagle"); repeat_command(7) fm_give_item(id, "ammo_50ae"); repeat_command(0) repeat_command(2) fm_give_item(id, "weapon_flashbang"); repeat_command(0) fm_set_user_health(id, get_pcvar_num(DOD_SniperHP)); fm_set_user_armor(id, get_pcvar_num(DOD_SniperAR)); fm_set_rendering(id, kRenderFxGlowShell, 69, 139, 0, kRenderNormal, 170); } case 4: { fm_strip_user_weapons(id); fm_give_item(id, "weapon_knife"); fm_give_item(id, "weapon_m249"); repeat_command(7) fm_give_item(id, "ammo_556natobox"); repeat_command(0) fm_give_item(id, "weapon_p228"); repeat_command(6) fm_give_item(id, "ammo_357sig"); repeat_command(0)
fm_set_user_health(id, get_pcvar_num(DOD_MachineGunnerHP)); fm_set_user_armor(id, get_pcvar_num(DOD_MachineGunnerAR)); fm_set_rendering(id, kRenderFxGlowShell, 0, 255, 127, kRenderNormal, 170); }
|